The reset element

Release 2.0 - ...

This action initiates reset processing by dispatching an xforms-reset event to the specified model.

In practice, this means it returns a particular XForms model to the state it was in when the form was opened. This allows the user to reset the contents of the form to their "starting point", which can increase usability of the form.

Example

XML CopyCode image Copy Code
<xforms:trigger>
   <xforms:label>Reset</xforms:label>
   <xforms:reset ev:event="DOMActivate" model="x"/>
</xforms:trigger>

Attributes

Name Required / optional Description
model optional XForms model selector, as defined in Single Node Binding Atttributes.
If this attribute is omitted, then the default is the model associated with the in-scope evaluation context node.
Common Attributes optional Any attribute from the Common Attributes collection (e.g. id).
XML Events optional Any attribute from the XML Events collection (e.g. ev:event)
Common Action Attributes optional Any attribute from the Common Action Attributes collection (if or while)

Content

The reset element does not allow any content.

Specification

Link to the XForms specification: the reset element.