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.
- Field prepopulated with HTML, no label element
- Field prepopulated with Javascript, label included, cleared onclick
- Field prepopulated with Javascript, label included, cleared onfocus, restored onblur
- Field prepopulated with HTML5 placeholder attribute
- No label nor default text, uses title attribute for label