Form Test Home Page: Pre-populated Input Fields

You submitted a search for "'; echo htmlentities(stripslashes($_POST['search'])); echo '", but there are no search results '; echo 'since these are just test pages. '; echo 'No harm done though. Keep on playing!

'."\n"; } ?>

This page is the hub for a series of tests on the accessibility and usability of various methods of pre-populating input fields in an HTML form. For additional information about the results of these tests see my blog.

  1. Field prepopulated with HTML, no label element
  2. Field prepopulated with Javascript, label included, cleared onclick
  3. Field prepopulated with Javascript, label included, cleared onfocus, restored onblur
  4. Field prepopulated with HTML5 placeholder attribute
  5. No label nor default text, uses title attribute for label