Re: Repeat and Submission

Hello

CL I'm a noob at xforms so any help on this will be very much appreciated.
CL Basically, I have two dropdown list that are dependants to the option
CL selected on the first one.

You could make a few changes, which might make your form work.

CL <xf:instance id="values" src="admin.cgi?action=getPermissionAccess"/>

This could be something like:

<xf:instance id="values"><root xmlns=""/></xf:instance>

to start with. It only needs to be populated once an item from the first 
list is selected.

CL        <xf:submission id="getValue" instance="values"
CL ref="instance('form')/access[index('accessRepeat')]"
CL action="admin.cgi?action=getPermissionAccess"
CL method="post" replace="instance" />

You want to @ref instance('form')/access/type here - this is what holds 
the selected value in the first list, so is presumably what you want to 
send back and use to populate the second list.

CL             <xf:send ev:event="xforms-value-changed" submission="getValue"
CL at="index('accessRepeat')">

You don't need at @at attribute for xf:send.

A while ago Mark Birbeck posted a link to his blog showing how to emulate 
Google Suggest with 5 lines of XForms, rather than 100 lines of 
JavaScript. It is pretty much what you want to do (swapping xf:input for 
xf:select1). That page will explain everything.

Swithun.

Received on Wednesday, 8 November 2006 16:27:56 UTC