0

I am facing problem during post form data. I have more than 3000 fields in my form. During post form data I am receiving only 1000 fields. I know I can use max_input_vars to increase size to 3000 or more but I am not sure about max numbers of fields is there any other option like chunk by chunk which can help me to post 100 fields at one time rather than entire block? is it a good idea to convert form fields data in json format and parse it through ajax post ?

shivanshu patel
  • 782
  • 10
  • 19

1 Answers1

1

Have you considered using jQuery to parse the form in batches and do an individual post to the processing .php file? This would allow you break the total number of fields into manageable chunks.

LS11
  • 261
  • 1
  • 6
  • Yes I am considering Jquery to parse form in batches. Do you know how to achieve through jquery ? – shivanshu patel Sep 25 '14 at 11:21
  • Well it's too generic a context with not enough information, to be able to provide an example. I would use jQ to read the values of a set of fields, and use its AJAX capabilities to pass those values to the processing file. Wait for the processing to finish, and when the AJAX call registers success, carry on with another batch of data. – LS11 Sep 25 '14 at 11:23
  • I have another thought in my mind. I am thinking to convert form data in to json befor post and parse all data through single variable is it good idea ? – shivanshu patel Sep 25 '14 at 11:27
  • Sounds doable, yes. It rather depends on the structure of the form and how much of a pattern there is in all those fields. There will be workload to be put in somewhere for sure. – LS11 Sep 25 '14 at 11:30
  • The form pattern is very simple three kind of fields are there text, radio and checkbox. Yes I am thinking same about workload but post size is not an issue . – shivanshu patel Sep 25 '14 at 11:33