last day (20 days later) » 

3:28 PM
-3
Q: Very Very Large Form

GrumpyI have a form that acts as a rollcall system, so there are a list of names that each have a number of input boxes generated. For each name, there is 25 input boxes. (5 per day for 5 days per week), and this works great all the way up until there are more than 35 names. As the company grows, we c...

 
You mention changing some settings, what have you got POST_MAX_VARS set to?
 
@KyleDomingo I would have thought the same thing, but the form works completely fine all the way up until there are > 35 employees.
@GeoffAtkins is that a PHP setting? I can't find it.
 
Sorry, MAX_INPUT_VARS grumbles to himself as he wanders off for more coffee
 
@arkascha its a private software for use with 10 specific people, locked down to specific pages they can write in, so they would be at risk of losing their jobs.
@GeoffAtkins I can't seem to find that either. I was able to edit the other PHP variables using a .user.ini file in my directory, as I don't have direct access to editing the php.ini file.
@arkascha its not a threat, its not something that was said, its just that I know they wouldn't do anything to harm the software. I plan to rewrite the code in the near future with stronger sql.
@GeoffAtkins I found it. Its set to 1000.
@KyleDomingo My post should be right at around 900, so it shouldn't be, and it won't let me change it via my .user.ini file for some reason.
 
25 inputs for each of 35 rows is 875 - plus the user_id is 910, then add submit, oh and you've got some select fields further on (you only need a few per row and you've exceeded the MAX_INPUT_VARS. You might have to check with whoever runs this server if you don't have privileges to adjust that value.
 
3:28 PM
@GeoffAtkins Okay, I will contact my host.
@GeoffAtkins It seems that did not fix it. I raised it to 6000, but still the same issue.
 
If you're winding up with a 403 error, there should be something in the logs that should point you towards the cause of the problem.
 
@GeoffAtkins again I thought the same thing, but I can't find anything about it in any logs. I'm filling out a support ticket to my providers to see if they can dig anything up.
 
My only suggestion would be to rebuild the form so it submits one record at a time; possibly using AJAX to reduce the impact on the UX. And I think that there'll be someone moving all of these comments to chat, sorry we couldn't in all this discussion find something that would qualify as an answer.
 
Its okay, I plan to rebuild the entire software in the near future (Due to possible security issues), just needed something that will fix this until then. Thank you for all of your help anyways.
 
3:42 PM
You shouldn't have too much problem adapting the existing form structure to have each employee's record as an individual form. A submit/reload the page routine should be quick enough that it'll work fine.
You may find that it's too slow, so adapting the form to use AJAX to send each record as it's completed wouldn't be overly complicated.
 

  last day (20 days later) »