Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to build a custom form that includes 4 fields and the submit button. I keep having this error thrown
"This form could not be submitted because $_POST was truncated to 5 input vars. PHP max_input_vars is 1000 and needs to be increased."
I have increased my max_input_vars up to 2500 and i still get the same message. I am using the Acquia Platform. If some one could point me in the right direction I would appreciate it.
Comments
Comment #2
ahsanalishahid CreditAttribution: ahsanalishahid commentedI am also experiencing this issue. I have also updated the webform4 to latest dev release as well and have changed the input max vars value to 10000 , but the issue persists.
#Edit:
For anyone having similar issue. You must need to call
<?php print drupal_render_children($form); ?>
at the end of form to print hidden elements and other drupal form related stuff. I added this line in my custom form and it worked!.
Comment #3
gaurishankarYes, It's working for me.
print drupal_render_children($form);
Comment #4
dlavely CreditAttribution: dlavely commentedThank you for your suggestions. Your solution work perfectly
Comment #5
dlavely CreditAttribution: dlavely commentedComment #6
RobertF CreditAttribution: RobertF commentedIn my case it's not like that, when you are submitting a form with "disabled" hidden elements, you will see the same error, just make sure that you didn't disable inputs (including inputs of type hidden) before submitting the form.