I have an inline entity form to add beans to a node. I want to alter the "Add new/Add existing" form.

You can use a simple form alter to make changes to this initial form (the add new/add existing form), however, once you have loaded the inline entity form and hit cancel, the original alter is not run when the initial form is reloaded.

Hook_inline_entity_form_entity_form_alter does not have any effect on these forms. Is there a hook I am missing, or can one be added so this could be possible?

Comments

kevincrafts’s picture

Status: Active » Closed (works as designed)

This is the hook I was looking for: hook_field_widget_form_alter(&$element, &$form_state, $context)

bisonbleu’s picture

Thanks a bunch @kevincrafts that's the hook I was looking for. Works.