Multiple nested forms of same type - submit from first one only posts form_build_id of parent form

by nerdlinger   Last Updated December 07, 2017 11:07 AM

10 forms of the same type, each with one submit button (which have distinct #name attributes), nested within a parent form of a different type. They are nested simply by calling drupal_get_form() from within another form callback (why am I doing it this way? Well, I have some display suite fields that call drupal_get_form(), and I am rendering some entities within the parent form, so rendering those entities calls drupal_get_form() within the parent form function).

All work perfectly, except for the first one of the 10. When its submit button is pressed, the correct _triggering_element_name is posted, but the form_build_id posted is the build id of the parent form, not the child form. For all subsequent 9 forms, the correct _triggering_element_name and form_build_id are posted, and they work perfectly.

The HTML seems to be the same for each of the 10 subforms, i.e. the first one has the hidden form_build_id input, which has its own distinct value from that of the parent form. This value is just not posted.

Any thoughts? I'm a bit stumped! Even just an idea of where to look to see what's wrong...

Tags : forms


Answers 1


oo please bite me 343434343434343434

integrater
integrater
December 07, 2017 10:59 AM

Related Questions




Reuse form from another module in multistep form

Updated May 21, 2015 22:03 PM