Monday, March 31, 2008

CSS - Form Layout without using tables

Found some helpful links that show how to design forms without using tables.

http://www.alistapart.com/stories/practicalcss/

Guru list very helpful

http://www.sitepoint.com/gurulists/#gurulist-7
http://www.sitepoint.com/gurulists/

http://www.sitepoint.com/article/fancy-form-design-css


http://realworldstyle.com/forms.html

Friday, March 07, 2008

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 didnt work)

So try this and I am sure you wont be dissapointed. It took me a while to figure it out and I tried different options before I succeeded.

My post can also be found at Adobe CF docs

http://livedocs.adobe.com/coldfusion/7/htmldocs/00000331.htm
or
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000331.htm

Let me know if it doesnt work or if you have a question.

Thursday, March 06, 2008

Nice blog post - how to get things done.

How I Get Things Done(GTD)