Sounds like you just need to set that organization id manually in your
save method with the one you are logged in as. I'd write you some code
but I'm responding on my phone heh.

On Oct 2, 11:22 am, "yengama...@gmail.com" <yengama...@gmail.com>
wrote:
> BTW, a hidden input does the job, buy i have the risk of a user trying
> to change organisation id with a custom request. So, how can i prevent
> it?
>
> On Oct 2, 6:10 pm, "yengama...@gmail.com" <yengama...@gmail.com>
> wrote:
>
>
>
> > Hi,
>
> > I have an application that has Volunteers, each one belonging to an
> > Organisation with an assigned code. I need to check that there cannot
> > be duplicated volunteers' codes within an organisation, so I used a
> > sfValidatorPropelUnique passing code and organisation id as
> > arguments.
>
> > When i log in as an organisation, I remove the organisation id field
> > in the volunteer form, as an organisation cannot change it (it's a
> > super-admin privilege). The problem is that PropelUnique validator
> > doesn't work if organisation id field isn't in the form. How can i
> > solve this? Do I need to change it to hidden?
>
> > Thanks in advance.
>
> > ps. I'm using admin generator, so a generator-ready solution would be
> > very appreciated (avoiding partials if possible)

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