Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
tytho23168y<input type="checkbox" name="choices" value="yes" /> Yes <br />
<input type="checkbox" name="choices" value="no" /> No <br /> -
@tytho forgot the square brackets there friend 😊. Check boxes allow for multiple selection, therefor inappropriate for yes-no prompts (see `type="radio"`)
-
fyroc58758y@tyho indeed. you only need one checkbox. Just don't forget to either set a default parameter or check to see if the check box variable exists. Technically you will only have a true once the check box is checked but if the check box is unchecked the variable will not exist unless you default it to false first.
-
tytho23168y@fyroc @dev-nope all good points, and to be fair, I shouldn't have treated this like stack-overflow. I was just attempting to get syntax out, not pull real-world examples out of my butt.
undefined