]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/Add_label_to_search_form_input_field.mdwn
web commit by madmax
[ikiwiki.git] / doc / todo / Add_label_to_search_form_input_field.mdwn
index 68e24b4d44c88d74b6f07a0b16cb0e1fb75a5b1f..86a32fb0767539de3d6f97660bd29a351f9fd9f3 100644 (file)
@@ -18,4 +18,21 @@ The patch below adds a label for the field to improve usability:
 > sites, but so far the only way I've seen to do it is by inserting a
 > nasty lump of javascript. --[[Joey]]
 
+>> Please don't do that, it is a bad idea on so many levels :) See e.g. 
+>> <http://universalusability.com/access_by_design/forms/auto.html> for
+>> an explanation why. --[[HenrikBrixAndersen]]
+
+>>> If you really want to do this, this is one way:
+
+    --- searchform.tmpl.orig        Sat Aug 25 11:54:28 2007
+    +++ searchform.tmpl     Sat Aug 25 11:56:19 2007
+    @@ -1,6 +1,6 @@
+     <form method="get" action="<TMPL_VAR SEARCHACTION>" id="searchform">
+     <div>
+    -<input type="text" name="phrase" value="" size="16" />
+    +<input type="text" name="phrase" value="Search" size="16" onfocus="this.value=''" />
+     <input type="hidden" name="enc" value="UTF-8" />
+     <input type="hidden" name="do" value="hyperestraier" />
+     </div>
+
 [[wishlist]]