1
votes

I'm trying to create a questionnaire using XForms, where the questions are loaded from the eXist database (in xml form) and are then displayed to the user so they can rate them and submit the answers. Currently I have all of that working, however I cannot find a way to load the questions into labels within the form - loading them into input/textarea's works fine, but looks pretty rubbish.

Here is a picture of what the form looks like currently

Is there any way to load those questions into labels, or just remove box around the text so just the text remains?

Thanks,

Robbie

2

2 Answers

0
votes

Fields in XForms have labels expressed with <xf:label>. You can dynamically set labels with the ref attribute, or a nested <xf:output>. For example:

<xf:input ref="...">
    <xf:label ref="..."/>
</xf:input>

or:

<xf:input ref="...">
    <xf:label><xf:output value="..."/></xf:label>
</xf:input>
0
votes

Use the <xf:output> control instead of <xf:input>.

All the attributes remain the same.