Topic
1 reply Latest Post - ‏2011-03-22T22:22:22Z by SystemAdmin
dany6883
dany6883
3 Posts
ACCEPTED ANSWER

Pinned topic modify data with XForm

‏2011-03-22T10:57:35Z |
Hello

I need to nuild a page wit Xform but with the data that can be modified, so I would like to load from an xml document some data, show them to the user and modify it.

How can I define the input component to do this? I know how to import the resource inside the xform file in the model node so for this I don't have problems...

thank you

Daniele
Updated on 2011-03-22T22:22:22Z at 2011-03-22T22:22:22Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    265 Posts
    ACCEPTED ANSWER

    Re: modify data with XForm

    ‏2011-03-22T22:22:22Z  in response to dany6883
    Daniele,

    I assume that instead of working with a static XML instance, you'd like to load it from a service. In XForms you can do this with an <xforms:submission>. You would typically run a submission to save data in a database, and you can see an example of this in this XForms tutorial for a "Save" button:

    http://wiki.orbeon.com/forms/doc/developer-guide/orbeon-forms-xforms-tutorial#TOC-Adding-a-save-button

    But similarly, you can also run a submission to load data on page load. You could use the same submission construct, but put inside your <xforms:model>:

    <xforms:send ev:event="xforms-model-construct-done" submission="id-of-your-submission"/>

    I hope this helps,

    Alex
    --
    Orbeon Forms - Web 2.0 Forms, open source, for the Enterprise
    http://www.orbeon.com/