If you mean like dividing your form into different fieldsets/groups
then what you can to is add like a public property in the form
organizing the fields.

someForm extends sfForm {
  public $fieldsets = array(
   'Profile' => array(
      'field_a'
    )
  )
}


<?php foreach($fieldsets['Profile'] as $name):?>
<?php echo $form[$name]?>
<?php endforeach;?>


On Jan 27, 11:46 pm, DoRiaN <[email protected]> wrote:
> Thanks, i thought to do that but why there is not solution ?
>
> On 27 jan, 15:40, Bernhard Schussek <[email protected]> wrote:
>
>
>
> > That's no problem the form framework can solve for you, it's a
> > programmatic problem.
>
> > You can either:
>
> > 1. Output the fields manually
>
> > echo $form['field']
>
> > 2. Add conditionals in the loop
>
> > foreach ($form as $name => $field)
> > {
> >   if (in_array($name, array('name', 'address')))
> >   {
> >     ...
> >   }
> >   else if ($name != 'foobar')
> >   {
> >     ...
> >   }
>
> > }
>
> > Bernhard

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

Reply via email to