0
CFSelect Change required attribute based on user input
New Here
,
/t5/coldfusion-discussions/cfselect-change-required-attribute-based-on-user-input/td-p/899081
May 05, 2008
May 05, 2008
Copy link to clipboard
Copied
I would like to upload text to a db and give users the option
to upload associated files on the same form. If they choose to
upload a file by using the cffile tag file selector (file1), I need
to require them to select a file type from a cfselect tag (type1)
to route the file to its proper desitination of the server. The
problem is that if I make the type1 field required, I can't submit
the form without selecting a type even though their is no file to
upload. If type1 isn't required, the file won't be uploaded to the
proper directory.
My thought is to make the type1 field required only if a file is selected by the user using the onchange attribute. How can I do this? or is their a better way still using client-side validation?
Thanks for your help.
My thought is to make the type1 field required only if a file is selected by the user using the onchange attribute. How can I do this? or is their a better way still using client-side validation?
Thanks for your help.
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/cfselect-change-required-attribute-based-on-user-input/m-p/899082#M82618
May 05, 2008
May 05, 2008
Copy link to clipboard
Copied
How's your javascript?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
2old2no
AUTHOR
New Here
,
/t5/coldfusion-discussions/cfselect-change-required-attribute-based-on-user-input/m-p/899083#M82619
May 05, 2008
May 05, 2008
Copy link to clipboard
Copied
I'm a beginner at js.
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/cfselect-change-required-attribute-based-on-user-input/m-p/899084#M82620
May 05, 2008
May 05, 2008
Copy link to clipboard
Copied
I can personally vouch for the book, Teach Yourself
Javascript in 24 Hours by SAMS publishing. It's how I
learned.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
2old2no
AUTHOR
New Here
,
LATEST
/t5/coldfusion-discussions/cfselect-change-required-attribute-based-on-user-input/m-p/899085#M82621
May 06, 2008
May 06, 2008
Copy link to clipboard
Copied
Thanks
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

