The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Checkbox value not being submitted - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Checkbox value not being submitted (/showthread.php?tid=384) |
Checkbox value not being submitted - chris - Dec 5th, 2009 Hi, For some reason the value of a checkbox in my form is not being submitted. Here's my HTML: Code: <input type="checkbox" value="agreed" /> I agree to the <a href="terms.html">legal terms.</a> Any insight as what I'm missing would be greatly appreciated. Thanks! RE: Checkbox value not being submitted - Ben - Dec 6th, 2009 Hi Chris, Ah! Just include a "name" attribute on your input field, like this: Code: <input type="checkbox" name="has_agreed" value="agreed" /> ... Hope this helps! - Ben RE: Checkbox value not being submitted - chris - Dec 6th, 2009 Hi Ben, Thanks for the suggestion; however, it still doesn't seem to be submitting that value. It's blank when I view the submission (see attached). Not sure what else to try. Thanks! Chris RE: Checkbox value not being submitted - Ben - Dec 8th, 2009 Is the field marked as a checkbox in the database? If so, on the Edit Form -> Fields tab, click the "Options" link for the field, then on the following page, click the "EDIT" button next to the option group dropdown. This will take you to a page that lists the values for that checkbox. In your case, it should be just one. What I suspect is that there's no label for that field (i.e. the second column). Try entering a value, then returning to the export page. If all goes well, you should see that label show up for all submissions that have that checkbox checked. Eesh... not my clearest post, but I hope you can make sense of it. - Ben RE: Checkbox value not being submitted - chris - Dec 9th, 2009 That worked. Thanks Ben! RE: Checkbox value not being submitted - Ben - Dec 10th, 2009 No worries! Glad I could help. - Ben |