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 ?
Asked
Active
Viewed 132 times
0
-
The max fields limit for modern browsers is (IIRC) 1024 – Mark Baker Sep 25 '14 at 11:15
-
Refer it: http://stackoverflow.com/questions/9399315/how-to-increase-maximum-post-variable-in-php – Ajitha Ms Sep 25 '14 at 11:17
-
¿What kind of form is? Maybe you can redistrubute you form using steps or other kind of redistribution – Enrique Muñoz Rodas Sep 25 '14 at 11:17
-
@MarkBaker I can't use max_input_vars. as I dont know max number of fields – shivanshu patel Sep 25 '14 at 11:21
-
@EnriqueMuñoz Yes I am thinking same like providing pagination. but need to provide in single page. Its last idea to do if I cant make it through single page. – shivanshu patel Sep 25 '14 at 11:23
-
Have you considered usability.... most people faced with a form with 3000 inputs will simply close that page in their browser and spand a bit more time on Facebook instead – Mark Baker Sep 25 '14 at 11:23
-
For this you have to save the data with AJAX and refresh the form in the callback or something like this. – Enrique Muñoz Rodas Sep 25 '14 at 11:29
-
@MarkBaker more than 3000 fields is worst scenario. one of our customer is doing something opposite than software design. – shivanshu patel Sep 25 '14 at 11:31
1 Answers
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