A general purpose element, used by widgets which need a text input control which is not associated with a form.
The widget:button element with the action attribute set to 'clear-value' can be used to clear entered content.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
property | Associates an input element with a property of a different element | xs:string | optional | ||
type | Specifies a domain of valid values | string, int, float, boolean | optional | ||
value | Contains the entered value. If the widget:input element is associated with a property, then the value attribute is a mirror of the associated property value. | xs:string | optional |
Action | Description |
---|---|
clear-value | Clears an entered value |
Property | Description | Type | Access |
---|---|---|---|
partial-value | Contains partially entered value, i.e. before the user accepts it by pressing 'Enter' or moving focus out of the input field. Used to handle incremental value changes. | xs:string | read |
value | Holds the entered value. If the widget:input is associated with a property, then the value property is a mirror of the associated property value. | xs:string | read/write |
In the following example an input element is associated with a content property of a display element. Entering a value in the input element changes the content displayed by the display element.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:widget="http://www.volantis.com/xmlns/2006/05/widget">
<head>
<title>widget:input</title>
</head>
<body>
<p>
<span>Enter value:</span>
<widget:input id="entry"/>
</p>
<p>
<span>Entered value:</span>
<widget:display property="entry#value"/>
</p>
</body>
</html>