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

dlavely created an issue. See original summary.

ahsanalishahid’s picture

I 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!.

gaurishankar’s picture

Yes, It's working for me.

print drupal_render_children($form);

dlavely’s picture

Thank you for your suggestions. Your solution work perfectly

dlavely’s picture

Status: Active » Closed (fixed)
RobertF’s picture

In 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.