Re: Filtering Default Text in Forms

David Woolley wrote:
>>One possible solution that I can see is to have default text forming a
>>pattern
> 
> I think your use of "default" here is a key to the real problem.  This
> usage of text is not default text it is an instruction to the user.
> If it is desirable (and interetingly it was not, in my experience,
> used for form controls in pre-web applications), it requires a new 
> attribute for the purpose, assuming that title is not adequate.

Perhaps creating the page with both the @title and the @value containing 
the instructions to the user. If javascript is enabled and the field has 
focus, select (if not already selected) the text that matches the @title 
so that the next keypress overwrites. When the field loses focus and it 
is empty - if that is invalid, then repopulate the @value with the 
contents of @title.

Any glaring usability or accessibility problems there? (With javascript 
disabled, the form degrades to starting off with the user instructions 
in the value field and title field.)

With something like that in place, then the @title contains the exact 
string that needs to be regexed out of the @value.


Mike.

Received on Monday, 5 July 2004 12:21:42 UTC