He Folks,

i've ran into a strange problem.

I am trying to remove a set of form fields from a allready
instanciated form.
here is a snippet:

$formClass = 'fooForm';
$fields = array('foo','bar'=>array('bazz','embed'=>'foo'));

$form = new $formClass();

unset($form['foo']); //wont work, ::offsetUnset throws an exception

what i am trying is to recursivly remove all the fields defined in
$fields.
the form still throws an error on "foo" and i expect a "unexpected
variable" error on this field.

As i dont know which form i am instanciating, i cant extend the class,
and do it inside the form.

why is sfForm::offsetUnset is throwing an Exception on this?

I tried it with iterating over the sfFormfieldSchema, replacing the
whole sfWidgetFormSchema and sfValidatorSchema, but nothing worked as
expected.

So whats the best way to remove form fields from instanciated forms?

cheerz
Robert

-- 
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