Re: DB_DataObject_FormBuilder : order in nested forms
| From: | Justin Patrin | Date: | Tue, 19 Apr 2005 00:09:39 +0000 |
| Subject: | Re: DB_DataObject_FormBuilder : order in nested forms | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18786@lists.php.net to get a copy of this message | ||
On 4/18/05, Thomas Balthazar <tba@voxteneo.com> wrote:
> Hello everybody,
>
> First, thank you Justin Patrin for your quick and precise answer to my
> former question!
> Formbuilder is a real pleasure to use!
>
> My question :
>
> I know that it is possible to order the fields in a form with
> "$fb->preDefOrder".
> But is it possible to order fields of nested forms (created with
> $fb->useForm())?
> For instantce, I would like to be able to display :
> 1/ form1_field1
> 2/ form2_field1
> 3/ form1_field2
> 4/ form2_field4
> 5/ form1_field6
> ...
>
If you're talking about multiple forms from multiple DataObjects the
no. FormBuilder only deals with one DataObject at a time. You could
always use insertElementBefore and removeElement to change the order
of elements in the resulting form.
$form->insertElementBefore($form->removeElement('form2_field1'),
'form1_field2');
--
Justin Patrin