Assuming of course we’re working with HTML Forms and GET/POST data, backend language agnostic. Asker is most fluent with PHP and Python.
Example: Tracking event attendance, there is an HTML page for the event administration that lists all available People. There is a column next to each name with a graphic/widget representing their attendance for the event. What’s the best way to update the Attendance status for a Person on the list?
One method I initially thought of was simply to use a Checkbox for attendance. However, unchecked boxes aren’t sent along with form data. The underlying logic would have to toggle the Attendance status to FALSE/OFF/Not Attending for any Person ID not sent along with the form. This breaks if the list is paginated!
The second method I thought about was using a graphic/button next to each name. Is it appropriate that each button be a submit button? As in: Is is allowed that a form element have multiple submit buttons? Or should each button/Person be wrapped in it’s own form element?
A fairly simple fix is to go with your checkbox method, but add a couple of hidden form elements that store values for the minimum/maximum values that are going to be submitted. That way your logic can handle ‘missing’ checkboxes as ‘off’ without breaking everyone that isn’t on the page.
I don’t recommend having multiple submit elements in a single form. If you want to go another direction, you could look into having a link (textual/graphic/button) on each row that uses ajax to toggle the attendance for that row’s person. That way nothing ever has to be explicitly ‘submitted’ by the user. As they toggle on the interface, updates happen in the background.