To remove widgets from outside of the form class, one way could be:
  $widgets = $form->getWidgetFormSchema();
  unset($widgets['myfield']);      // and all other fields
  $validators = $form->getValidatorSchema();
  unset($validators['myfield']);      // and all other fields
  // maybe add, after having unset all the fields:
  $form->resetFormFields();

I think that this should work (to be verified). It is however only a
workaround for doing it within the form class (or in a subclass of it,
in the configure() method).

The sfFormFieldSchema stuff (to which the ArrayAccess stuff in the
form class is linked to) is a sfForms-internal thing that has is own
rules by when its data does exists and/or is valid. The reference are
still the widget and validator schemas.

Hope that helps, RAPHAEL

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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