I need to alter a Redhen Contact form when it is attached to the user registration form. More generically, I need to alter a sub form. The form is added to
hook_form_FORM_ID_alter() in rendhen_contact.module:1029. (I don't think this is specific to Redhen's implementation; I'm just providing this as a reference point.)
The first issue I encountered was that the hook implementation in redhen_contact.module hadn't occurred when my hook was called. In a custom module, I used
hook_module_implements_alter() to resolve that (see screenshot at bottom for
kpr()). With that I'm still unable to alter, for example, the
#title attribute of
field_agency_interest. Even if I do
...['und']['title'] it doesn't change.
I tried using
$form['#after_build'] = 'module_callback_name' but I can't edit the sub form elements.
How can I alter a sub form added to a form?