Posts

Showing posts from March, 2008

CSS - Form Layout without using tables

Coldfusion CFSELECT Validation Fails

Most of us have issues with Coldfusion CFSELECT Validation i.e. form submits even though he didnt select an entry from drop down list and you have validation in CFSELECT . Here is the solution to this issue.

1. The validation works only if you have size attribute of cfselect set to a value greater than 1.

Here is my code that works

<cfselect name="sec_question" required="yes" message="You must select a security question to reset your password." size="2">

<option value="1">What is your mother's maiden name?
<option value="2">In what city were you born?
<option value="3">What is the title of your favorite book?
<option value="4">What is your favorite pet's name?

</cfselect>

2. Here are some observations

a. I didnt require selected="" attribute inside cfselect

b. I didnt require Please select a value i.e. with a space or without space(either way, I tried and it didn…

Nice blog post - how to get things done.