I'd like to be able to alter a form normally, adding a regular form API field. Then for field_group to merge my form fields into field groups. Unfortunately field_group kills field names by defining a new variable instead of working with what exists. All so I can avoid having to use hook_field_group_build_pre_render_alter.
This is the desirable execution:
// Add new form API field in here.
my_module_form_alter();
// Field group currently adds a prerenderer (field_group_form_pre_render)
field_group_form_alter();
// Nesting creates the field group (via field_group_form_pre_render() -> field_group_build_entity_groups() -> field_group_fields_nest() )
// It should check if the group container already exists, uses a reference to it instead of re-instantiating.
field_group_fields_nest();
This makes it a lot easier to add custom form elements beneath a field group.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2921758-merge.patch | 602 bytes | dpi |
Comments
Comment #2
dpiAdding patch.
Comment #3
jibranPatch looks good to me.
Comment #5
nils.destoop commentedThx for the patch, I committed it to dev