You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

<form>

The <form> element acts as container for controls elements.

Contents

A combination of one element <input type=”submit”> and

  • one or more of the following elements: <input>, <select>, <br>, <p>
  • or one single <textarea> element
Attributesattributes

values

(Default are bolded)

description
actionURL

Specifies a form processing agent. User agent behavior for a value other than an
HTTP URL is undefined. Refer to [5] for correct URL format.

methodget

Specifies the HTTP method used to send the form to the processing agent. Only get
method is supported in XHTML-GP.


<input>

The <input> element represents editable area

Contents

Empty

Attributesattributes

values

(Default are bolded)

description
type

text
password
checkbox
radio
submit
hidden

Specifies the type of control to create.

nametext

Assigns name to the control. Not used for type=”submit”. Some names are reserved for Gigaset systems (see [5]).

valuetext

Specifies the initial value of the control. Mandatory for type=”radio” and type=”checkbox”.

disableddisabled

When set for a form control, this Boolean attribute disables the control for user input.

checkedchecked

Specifies the state of a button. Valid for type=”radio” and type=”checkbox”.

inputmode

text
digits
dialpad

Specifies appropriate input mode for the text input expected in an associated input control.
Possible values means:

text: all available characters

digits: digits only: 0…9

dialpad: dial characters: 0…9 and #, *, P, R

maxlength1..32

Specifies the maximum number of editable characters. Valid for type="text" and type="password"

Example:

<body>

<form action="http://host.com/adddata" method="get">

<p>text description</p>

<p>Text: <input type="text" name="input1" maxlength="12" value="default" /></p>
<p>Password: <input type="password" name="input2" maxlength="12" /></p>
<p>Checkmark <input type="checkbox" name="c1" checked="checked" value="check 1" /></p>
<p>Radio 1 <input type="radio" name="r1" checked="checked" value="option 1" /></p>
<p>Radio 2 <input type="radio" name="r1" value="option 2" /></p>
<p><input type="submit" value="Send"/></p>

</form>

</body>


<select>

The <select> element indicates list with options.

Contents

One or more of the following elements: <option>

Attributesattributes

values

(Default are bolded)

description
disableddisabled

When set for a form control, this boolean attribute disables the control for user input.

nametext

Assigns a name to the control.

Example:

<body>

<form action="http://host.com/adddata" method="get">

<p>Color:

<select name="colors">

<option value="1">red</option>

<option value="2" selected="selected">green</option>

<option value="3">blue</option>

</select>

</p>

<input type="submit" value="Submit"/>

</form>
</body>



  • No labels