Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xforms select trouble

Status
Not open for further replies.

ClarkePeters

IS-IT--Management
Oct 25, 2006
4
TW
I do fine with select1 and textarea, but can't seem to get "select" to work in my xforms (firefox 1.5.0.9 w/xforms ext).

I need to select zero or more of several choices. (more than one choice allowed to be checked)

here's my instance.xml:

<?xml version="1.0" ?>
<test>
<ii id="1">
<qu id="0">
<ans id="1" type="radio"></ans>
<ans id="2" type="radio"></ans>
<ans id="3" type="radio"></ans>
</qu>
</ii>
</test>

Here's my xhtml/xforms file below. I first tried placing
-- ref="//ans[@id='1'] -- (and @id='2', '3')
in each of the corresponding <value> elements. Then I tried placing just ...@id='1' in the <select> element just to see if I might get a string back. But I'm getting nothing. I tried wrapping each element separately into it's own select element but even that didn't work. Any ideas?

?<?xml version="1.0" ?>



<h:html
xmlns:h="
xmlns:ev=" xmlns:xf="


<h:head>



<h:title>

XHTML/XForms</h:title>

<xf:model>

<xf:instance src="xfinstance.xml"/>


<xf:submission id="xfanswers"
action="
method="post"/>


</xf:model>


</h:head>


<h:body>






<xf:label> Several answers may be correct </xf:label>


<xf:select appearance="full">

<xf:label> How well does Mary sing? </xf:label>

<xf:item>

<xf:label> Well. </xf:label>

<xf:value > Well. </xf:value>

</xf:item>


<xf:item>

<xf:label> well enough. </xf:label>

<xf:value > well enough. </xf:value>
</xf:item>


<xf:item>

<xf:label>better than most </xf:label>

<xf:value> better than most </xf:value>

</xf:item>


</xf:select>



<xf:submit submission="xfanswers">

<xf:label>Submit</xf:label>

</xf:submit>


</h:body>

</h:html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top