Do not show group-adding subform when adding an action to an existing group
And finally, restricting adding that extra form, the group subform in the action node posting form, to only when the action is called without a group specified:
In restricting that subset of form_alter...
Could check $form here:
[#action] => /eng/node/add/action?gids[]=156
But it seems more precise to check $form over in this mess:
[og_nodeapi] => Array
(
[visible] => Array
(
[og_groups_visible] => Array
(
[#type] => item
[#title] => Audience
[#value] => The group the action will be associated with
)
)
[invisible] => Array
(
[og_groups_hidden] => Array
(
[#type] => hidden
[#value] => a:1:{i:156;s:3:"156";}
)
[og_groups] => Array
(
[#type] => value
[#value] => Array
(
[156] => 156
)
)
)
)
That comes down to:
$form['og_nodeapi']['invisible']['og_groups']['#value']
Which I will stick in an if statement wrapping the modified subform code, which you can find hidden somewhere deep in the over-documented odyssey on merging two forms.
Comments
Post new comment