RE: Form text field default & validation

 

 I'm not sure if it's an acceptable solution (maybe other members of this list might be able to enlighten me), but I have always added a single blank space as default text. AFAIK, the requirement for default text arises from the fact that certain user agents might not display form elements at all if they are missing a default value. value=" " does not usually cause any problems in terms of automatic validators, and - hopefully - with those user agents that exhibit the quirky behaviour mentioned above (btw...anybody know which exact browsers behave that way ?). as long as you strip the leading blank space from the form results after submission, you should be able to still check if a user left fields empty.
  
 Patrick
 ________________________________
 Patrick H. Lauke
 WWW Editor
 External Relations Division 
 Faraday House 
 University of Salford 
 Greater Manchester 
 M5 4WT 
 
 Tel: +44 (0) 161 295 4779
 
 e-mail: webmaster@salford.ac.uk
 www.salford.ac.uk
 
 A GREATER MANCHESTER UNIVERSITY 
  

  -----Original Message----- 
  From: Donna m87 [mailto:dm87@rogers.com] 
  Sent: Mon 31/03/2003 20:05 
  To: w3c-wai-ig@w3.org 
  Cc: 
  Subject: Form text field default & validation
  
  


  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:43:09 UTC