Whilst the select1 control allows the user to choose one option from amongst many, the select control allows multiple options to be picked. We'll illustrate the use of this control by providing a way for users to indicate the subject of the link. To begin with we'll assume that any links we save are about XForms, skiing or both:
</xf:textarea>
<xf:select ref="tags" appearance="full">
<xf:label>Tags:</xf:label>
<xf:hint>Enter some <em>tags</em> for the link</xf:hint>
<xf:item>
<xf:label>XForms</xf:label>
<xf:value>xforms</xf:value>
</xf:item>
<xf:item>
<xf:label>Skiing</xf:label>
<xf:value>skiing</xf:value>
</xf:item>
</xf:select>
<xf:input ref="dt">
As with the other controls we'll only allow the user to enter data into this one when a URL and title have been provided:
<xf:bind nodeset="extended" relevant="../url != '' and ../description != ''" />
<xf:bind nodeset="tags" relevant="../url != '' and ../description != ''" />
<xf:bind nodeset="dt" type="xs:date" relevant="../url != '' and ../description != ''" />
Finally, we need to update the CSS rules:
xf\:input,
xf\:select,
xf\:select1,
xf\:textarea,
xf\:output
{
.
.
.
}
.input-value,
.select-value,
.select1-value,
.textarea-value
{
.
.
.
}
xf\:input xf\:label,
xf\:select xf\:label,
xf\:select1 xf\:label,
xf\:textarea xf\:label
{
.
.
.
}
Save the form, refresh your browser, and then enter a URL and a title, and when the hidden controls are revealed you should see two check-boxes for adding tags.


Recent comments
14 weeks 3 days ago
14 weeks 3 days ago
18 weeks 13 hours ago
19 weeks 3 days ago
19 weeks 3 days ago
19 weeks 4 days ago
19 weeks 6 days ago
19 weeks 6 days ago
19 weeks 6 days ago
19 weeks 6 days ago