W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2003

Re: Form text field default & validation

From: Josh Hughes <josh@deaghean.com>
Date: Mon, 31 Mar 2003 14:25:58 -0500
To: w3c-wai-ig@w3.org
Message-ID: <20030331142558550643.GyazMail.josh@deaghean.com>

Well, presumably all you would have to do is check that the text field 
isn't empty *and* doesn't contain the default text. Something like...

if ((textfield == '') || (textfield == 'default text')) {
	echo "You need to fill out all the forms";

What are you using to validate the form anyway? Javascript? PHP?


> I have been searching for a solution to this dilemma, perhaps I am 
> searching using the wrong keywords, I have not found a solution.
> I want to validate my form so that the required fields each contain 
> data, entered by the submitter.  Accessibility demands that a text 
> area field contain default text.  When default text is included for a 
> form field it validates automatically, and the submitter does not 
> receive a reminder to fill in the required fields.
> How can I include default information in the text field AND validate 
> that same text field?
> Thanks
> Donna
Received on Monday, 31 March 2003 14:26:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:14 UTC