One additional note.  It's often common to have one "label" for the
entire collection of checkboxes.  So i'd like to be able to do this as
well.

On Jun 2, 5:16 pm, "Slick Rick" <[EMAIL PROTECTED]> wrote:
> I'm trying to create a dynamic list of "groups", that can be selected via 
> checkboxes.  What is the best way to create this "collection" of checkbox 
> widgets in my form class so it is handled by the rendering engine as well as 
> validation and error handling?
>
> I tried to do this:
>
> foreach ($groups as $group)
> {
>   $schema['group'][] = new sfWidgetFormInputCheckbox(array(), array('value' 
> => $group['id']));
>
> }
>
> ... but when I try to render it, it tells me Widget "group" does not exist.  
> Even if try to echo $form['group'][0]->render().  Same error.
>
> Is there some internal mechanism that can handle groups of form elements 
> properly?
>
> Thanks for any help...
>
> -- Ian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to