Hi Javier!
Why are you unsetting a field in the action?
What's your purpose?

Cheers,
Francesco

On Mon, Mar 7, 2011 at 6:43 PM, Javier Garcia <tirengar...@gmail.com> wrote:

> Well I mean $this->configuration->getForm()->getWidgetSchema()-
> >offsetUnset('clients');
>
> On Mar 7, 7:40 pm, Javier Garcia <tirengar...@gmail.com> wrote:
> > Hi,
> >
> > I'm trying to unset a field before saving it, exactly in the
> > executeCreate() function generated by sf. I'm using this:
> >
> >
> $this->configuration->getForm()->getWidgetSchema()->offsetUnset('clienti');
> >
> >     var_dump($this->configuration->getForm()->getWidgetSchema());
> >
> > But after that the field "clients" is still there:
> >
> > object(sfWidgetFormSchema)[180]
> >   protected 'formFormatters' =>
> >     array
> >       empty
> >   protected 'fields' =>
> >     array
> >       'id' =>
> >         object(sfWidgetFormInputHidden)[211]
> >           protected 'parent' =>
> >             &object(sfWidgetFormSchema)[180]
> >           protected 'requiredOptions' =>
> >             array
> >               ...
> >           protected 'attributes' =>
> >             array
> >               ...
> >           protected 'options' =>
> >             array
> >               ...
> >       'name' =>
> >         object(sfWidgetFormInputText)[212]
> >           protected 'parent' =>
> >             &object(sfWidgetFormSchema)[180]
> >           protected 'requiredOptions' =>
> >             array
> >               ...
> >           protected 'attributes' =>
> >             array
> >               ...
> >           protected 'options' =>
> >             array
> >               ...
> >       'clients' =>
> >         object(sfWidgetFormInputText)[184]
> >           protected 'parent' =>
> >             &object(sfWidgetFormSchema)[180]
> >           protected 'requiredOptions' =>
> >             array
> >               ...
> >           protected 'attributes' =>
> >             array
> >               ...
> >           protected 'options' =>
> >             array
> >               ...
> >       '_csrf_token' =>
> >         object(sfWidgetFormInputHidden)[203]
> >           protected 'parent' =>
> >             &object(sfWidgetFormSchema)[180]
> >           protected 'requiredOptions' =>
> >             array
> >               ...
> >           protected 'attributes' =>
> >             array
> >               ...
> >           protected 'options' =>
> >             array
> >               ...
> >
> > Any idea?
> >
> > sf 1.4
> >
> > Javi
>
> --
> 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 users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
francesco levorato aka flevour
http://flevour.net/ - @flevour
"Now while the blood is hot you should make your way with vigour to better
things." (Seneca)

-- 
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 users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to