This is an archive of an inactive wiki and cannot be modified.

When using free text input, try to fill the input field with a default value. That value might be, for example, the most used value by previous user.

Filling a text input with a default value can be done in XHTML Basic and XHTML Mobile Profile with the attribute value in input elements. Sample code shown below illustrates an example of use of value attribute:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
    "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>Example of free text input</title>
   </head>
   <body>
      <p>
        <label for="txtSpanishProvince">Province:</label>
      </p>
      <p>
        <input class="input" type="text" title="Enter a Spanish province" 
               name="txtSpanishProvince" id="txtSpanishProvince" value="Asturias" />
      </p>
   </body>
</html>


CategoryBpProvideDefaults

Contributions to this wiki are governed by the W3C policies for Contribution to W3C' wiki on Mobile Web.