[Flow] having trouble with the property attirbute on collections within collections
Stephen Bungert
stephenbungert at yahoo.de
Thu Dec 5 08:56:44 CET 2013
Hello,
Can someone give me some advice about creating checkboxes for account roles?
https://gist.github.com/riscos/7801616
Here is my partial. {roles are all the roles from the roles table}, my forms
object is the current selected user. {user}.
I loop through each user's accounts and want to show checkboxes for each
role and indicate through the checkbox if the account has this role or not,
and let me assign roles to the user's accounts.
But I'm not sure what the property should be here. I have tried all kinds of
variations.
Basically I want checkboxes with names like this (or whatever is needed to
get flow to create the associations):
user[accounts][some_kind_of_account_id_here][roles][some_kind_of_role_here]
so that I can just check which roles people have.
Is this possible like this with fluid?
I know you can do this with doctrine collections that are ManyToMany
properties in a select tag as I do this a lot
But these are checkboxes that represent colections within collections.
Do I need to not use the property attr on the checkbox viewhelper and just
create my own name attribute? If so what should it look like?
More information about the Flow
mailing list