-1

I have a complex form API managed form that has several fieldsets with nested fieldsets and table elements (defined with webform component editor) with AJAX-controlled 'Add another' and 'Remove Last' buttons. There is also a form submit button at the end of the form, external to all fieldsets.

After a certain (of the order of 100) number of element groups (containing 4 or 5 fields each) are added and the form is submitted, the $_POST data generated after submitting the form does not include the value of the input element, so at a later stage the form API cannot determine the correct triggering element in function _form_button_was_clicked of form.inc.

The $form_state['input'][$element['#name']] element does not exist.

I've doubled the post_max_data and explicitly named the input element (by setting $element['#name']), all to no avail. I'd appreciate any thought on what else to try...

3
  • 1
    Have you checked the max_input_vars issue? See drupal.stackexchange.com/questions/90638/…
    – sanzante
    Mar 21, 2017 at 15:23
  • Yes, that did the trick. Thank you! It would have been nice if php emitted some sort of error or warning under such conditions. Mar 22, 2017 at 6:54
  • Usually a warning is emitted in the PHP error log. May be your Drupa isntallation is not configured to whow those PHP warnings, but it should be in the PHP error log.
    – sanzante
    Mar 22, 2017 at 8:18

1 Answer 1

1

As sanzante suggested, the solution is to increase php's max_input_vars setting. I did it in the site's .htaccess file.

Not the answer you're looking for? Browse other questions tagged or ask your own question.