Read-only controls in XsltForms

43 views Asked by At

I was trying to set an input control as "read-only", but it doesn't work as explained in Equivalent XSLTForms class values.

<xf:input ref="instance('person')/@name" class="xforms-readonly">
    <xf:label>Name:</xf:label>
</xf:input> 

Any idea why? I'm trying to avoid using CSS and use 100% xforms capabilities.

1

There are 1 answers

0
Alain Couthures On BEST ANSWER

It is a major feature of XForms to consider properties, such as readonly, at data level not at control level.

So, this has to be decided with a binding within the model.

The CSS class xforms-readonly is automatically associated/removed by XSLTForms according to the effective status of the corresponding node.