Good day to all!
There is an old HTML problem -- browsers do not send anything about unchecked checkboxes when submitting forms. How do you people usually use HTML::FillInForm to uncheck checkboxes which default to checked state?
Example:
Suppose, I want to refill this form using HTML::FillInForm after user submitted the form. She unchecked the checkbox. To repeat unchecking the checkbox I need to pass c => 0 to fill() but browsers in their eternal wisdom do not send me anything about the checkbox so my code now needs knowledge that there is such a control on the form.<form> <input type=checkbox name=c checked> </form>
I've faced the issue ten or more times and always used some hacks with enumerating all checkboxes in a list and then generating pairs to pass to fill(). Are there cleaner ways?
In reply to HTML::FillInForm vs. checked by default checkboxes by kappa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |