tags:

views:

51

answers:

1

In order to filter the available options on one section of my web application, I would like to get the user object at the form object. I found some information about possible ways to do that (using sfContext, for instance) but some users discouraged this approach.

What is a possible manner to achieve my purpose?

+4  A: 

The best way is to add some logic to BaseForm so you can use self::getValidUser(); without ever using sfContext, which is indeed generally not recommended.

Check this awesome blog post for more infos : http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-with-Symfony

DuoSRX
Hi there!Thanks for the help!Best regards!
Rui Gonçalves