The control element child of the setfocus element

Release 2.0 - ...

The control element child of the setfocus action element provides an alternate means of specifying the control that receives the xforms-focus event.

The control element can provide the desired element identifier with either its string content or the value attribute. If both are given, then the value attribute takes precedence.

Example

XML CopyCode image Copy Code
<xforms:setfocus ev:event="DOMActivate">
   <xforms:control>City</xforms:control>
</xforms:setfocus>

Attributes

Name Required / optional Description
value optional Attribute containing an XPath expression to evaluate using the in-scope evaluation context.
To obtain the desired element identifier, the result of the expression is processed as if by call to the XPath string() function.
An empty string is used if the XPath evaluation fails

Content

The control element only allows inline text content.

Specification

Link to the XForms specification: the control element child of the setfocus element.