Re: Quickform group error
| From: | rav k | Date: | Fri, 08 Dec 2006 13:02:06 +0000 |
| Subject: | Re: Quickform group error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26026@lists.php.net to get a copy of this message | ||
Do you mean clear the skills array in the while loop before adding the next one??? Also can you explain why the error is caused in this case so we can troubleshoot this ourselves in the future :)
www.bitesoftware.com - software for a better lifestyle
From: Alexey Borzov <borz_off@cs.msu.su> To: rav k <rav220@hotmail.com> CC: pear-general@lists.php.net Subject: Re: [PEAR] Quickform group error Date: Fri, 08 Dec 2006 15:53:05 +0300 MIME-Version: 1.0 Received: from imap.cs.msu.su ([212.192.248.39]) by bay0-mc3-f4.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Fri, 8 Dec 2006 04:51:35 -0800 Received: from [127.0.0.1] (oc.cmc.msu.ru [10.3.109.232])by imap.cs.msu.su (8.13.7/8.13.6) with ESMTP id kB8CpV22063248(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);Fri, 8 Dec 2006 15:51:33 +0300 (MSK)(envelope-from borz_off@cs.msu.su) X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlK3oXsmRrh6gU= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 References: <BAY108-F150E34EDAE253E897D3A869AD30@phx.gbl> X-Virus-Scanned: ClamAV 0.88.6/2303/Fri Dec 8 08:07:51 2006 on imap.cs.msu.su X-Virus-Status: Clean Return-Path: borz_off@cs.msu.su X-OriginalArrivalTime: 08 Dec 2006 12:51:38.0199 (UTC) FILETIME=[99A68670:01C71AC7] Hi, rav k wrote:_________________________________________________________________ Windows Live Messenger has arrived. Click here to download it for free! http://imagine-msn.com/messenger/launch80/?locale=en-gbThis is what I'm doin to dynamically add the skills as checkboxes: /* ADD THE SKILLS */ $res =& $mdb2->query('SELECT * FROM Skills'); while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {Turn off register_globals and/or clear the $skills array before adding form elements to it.$skills[] = &HTML_QuickForm::createElement('advcheckbox', $row['skillid'], null,'<b>'.$row['skillname'].'</b>'.' : '.$row['description']);} And I am adding them this way: $form->addGroup($skills, 'skills', 'Your skills:', '<br />'); The problem is I get the following error when attempting to validate: Fatal error: Call to a member function on a non-object in /home/user/public_html/iim/pear/PEAR/HTML/QuickForm/group.php on line 391 Can anyone please offer a solution to this??