Repeating Sections

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Repeating Sections

Dustin Henson-2
I have an issue with a data entry page where I don't know how many items the user will want to list. Think of a request form where the fields for one request start out showing. However, the user can click an add button to repeat that section of fields to add a second, third or fourth request. Is there a way to do this in Orbeon?

The XML would of course be a repeating section like this:
<requestList>
    <request>
        <priority></priority>
        <dateNeeded></dateNeeded>
        <description></description>
    </request>
    <request>
        <priority></priority>
        <dateNeeded></dateNeeded>
        <description></description>
    </request>
</requestList>

Thanks,
Dustin


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Repeating Sections

fl.schmitt(ops-users)
Dustin,

> I have an issue with a data entry page where I don't know how many items
> the user will want to list. Think of a request form where the fields for
> one request start out showing. However, the user can click an add button
> to repeat that section of fields to add a second, third or fourth
> request. Is there a way to do this in Orbeon?

yes, i use such a construction quite often - you just need to use
xforms:repeat. You could create a html table with a repeat surrounding
the table rows. Each rows contains the input controls to fill in the
data for the specific request, and a trigger to issue a xforms:insert
that adds another empty request fragment.

Here's the documentation regarding xforms:repeat:
http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-repeat

There are some examples with source code in the xforms sandbox:
http://www.orbeon.com/ops/xforms-sandbox/
(select the "Test Samples" tab and select one of the examples from the
combo box).

HTH
florian




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws