• 1 reply
  • Latest Post - ‏2011-03-22T22:22:22Z by SystemAdmin
3 Posts

Pinned topic modify data with XForm

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

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

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

    Re: modify data with XForm


    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:

    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,

    Orbeon Forms - Web 2.0 Forms, open source, for the Enterprise