I think you could pass the user as an option in the constructor, and
than unset it in the configure method.
Hope it helps
On Sep 8, 4:31 pm, torok84 wrote:
> Hi,
>
> I have a form to select some search options. I have a field that I
> wanto to show only if the user is logged in. I want to do som
I think you could pass the user as an option in the constructor, and
than unset it in the configure method.
Hope it helps
On Sep 8, 4:31 pm, torok84 wrote:
> Hi,
>
> I have a form to select some search options. I have a field that I
> wanto to show only if the user is logged in. I want to do som
Thanks,
this is what I was trying to do, but actually it is not very nice :).
It didn't occur to me I could pass a parameter in the constructor.
Paolo
On Sep 8, 4:43 pm, Christopher Schnell
wrote:
> hi,
>
> you could do something nasty like
>
> if(!$this->getUser()->hasAttribute('user'))
>
Hi,
You can also create 2 form classes : the first for authenticated users
(authenticatedUsersForm for example) and the other for non-logged
users (nonAutenticatedUsersForm for example).
class authenticatedUsersForm extends nonAutenticatedUsersForm
define your form widgets and validators in confi