Default Values in XForms Input
Posted
by Josh
on Stack Overflow
See other posts from Stack Overflow
or by Josh
Published on 2009-11-13T18:33:13Z
Indexed on
2010/05/25
1:01 UTC
Read the original article
Hit count: 409
I have an XForm that has certain fields that may often be left blank (optional street address). Is there is technique to set a default value for that field, preferably a space (I am running into weird formatting issues with CSS). The html form way of value=""
doesn't work, neither does setting a default value in the XML schema.
EXAMPLE:
<xforms:input ref="clientaddress/streetaddress2" model="model_inventory" >
<xforms:label>Street Address (Line 2)</xforms:label>
Leaving this field blank results in <streetaddress2/>
in the resulting xml document
I want
<streetaddress> </streetaddress>
© Stack Overflow or respective owner