Re: QuickForm Error??? quickform outputs 2 forms with code for one.
| From: | Bertrand Mansion | Date: | Wed, 17 Jul 2002 15:53:49 +0000 |
| Subject: | Re: QuickForm Error??? quickform outputs 2 forms with code for one. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1911@lists.php.net to get a copy of this message | ||
le 17/07/02 16:43, David Dahl à david@ddahl.com a écrit :
> Why would this code produce 2 forms?
> this outputs 2 forms one on top of the other. has this happened to
> anyone else?
>
>
> require_once ("HTML/QuickForm.php");
> $newFloorForm = new HTML_QuickForm('newFloor0', 'POST');
> $newFloorForm->addHeader('<span class=csbold>Create a new
> Floor:</span>');
> $newFloorForm->addElement('hidden', 'a', 'buildings');
> $newFloorForm->addElement('hidden', '_sub', 'unitsFloors');
> $newFloorForm->addElement('hidden', '_sub2', 'newFloor2');
> $newFloorForm->addElement('hidden',
> '_building_id',"$building_id");
> $newFloorForm->addElement('text', 'floorid', 'Floor ID (or
> #)',
> 'size=20 maxlength=20');
> $newFloorForm->addElement('select', 'type', 'Type',
> array("Residential" => "Residential", "Utility" =>
> "Utility",
> "Roof" => "Roof", "Mixed" => "Mixed" ));
> $newFloorForm->addElement('textarea', 'description',
> 'Description','cols=40 rows=5');
> $buttons_nf[] = &HTML_QuickForm::createElement('submit', null,
> 'Create New Floor');
> $newFloorForm->addElementGroup($buttons_nf);
> $newFloorFormDisplay = $newFloorForm->toHTML();
That doesn't come from QuickForm, your code works fine for me.
Check your code in the other places.
Thanks,
Bertrand Mansion
Mamasam