0
cfinput type=checkbox
Participant
,
/t5/coldfusion-discussions/cfinput-type-checkbox/td-p/2713104
Jun 08, 2010
Jun 08, 2010
Copy link to clipboard
Copied
I expected the checkbox to send a true or false , but it appears if it's not checked it doesn't get sent in the form collection ?
so instead of checking if form.checkbox EQ "Y" , instead I do this
if isDefined("form.checkbox")
is this correct ?
TOPICS
Getting started
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/cfinput-type-checkbox/m-p/2713105#M119157
Jun 08, 2010
Jun 08, 2010
Copy link to clipboard
Copied
if isDefined("form.checkbox")
structKeyExists() is more robust than isDefined(), but that's the general idea, yeah.
More reading for you:
http://www.w3.org/TR/REC-html40/interact/forms.html#checkbox
--
Adam
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/cfinput-type-checkbox/m-p/2713106#M119158
Jun 08, 2010
Jun 08, 2010
Copy link to clipboard
Copied
It's one of the ways that work. Others include StructKeyExists or hidden form fields.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Dax_Trajero
AUTHOR
Participant
,
LATEST
/t5/coldfusion-discussions/cfinput-type-checkbox/m-p/2713107#M119159
Jun 08, 2010
Jun 08, 2010
Copy link to clipboard
Copied
thanks Adam
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

