I need to select zero or more of several choices. (more than one choice allowed to be checked)
here's my instance.xml:
Expand|Select|Wrap|Line Numbers
- <?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>
Expand|Select|Wrap|Line Numbers
- ref="//ans[@id='1'] <!--and @id='2', '3' respectively-->
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" ?>
- <h:html
- xmlns:h="http://www.w3.org/1999/xhtml"
- xmlns:ev="http://www.w3.org/2001/xml-events"
- xmlns:xf="http://www.w3.org/2002/xforms">
- <h:head>
- <h:title>XHTML/XForms</h:title>
- <xf:model>
- <xf:instance src="xfinstance.xml"/>
- <xf:submission id="xfanswers"
- action="http://localhost/PHPstuff/xfanswers.php"
- 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>