User Input Instance Population?

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

User Input Instance Population?

Vedha
It is possible to input a XForm instance from the form? I mean, but supplying it in a text area?

If i input a proper instance xml in a text area, it is possible to populate any internal instance with this supplied new content? I mean, all UI and validation should work based on this supplied instance content.
Reply | Threaded
Open this post in threaded view
|

Re: User Input Instance Population?

Alessandro  Vernet
Administrator
Hi Vedha,

You can implement custom XForms code that takes the content of textarea, and replaces an instance with the parsed content of the text area. We have an example that shows how to do this with an upload, instead of textarea, but hopefully this will give an idea:

http://wiki.orbeon.com/forms/how-to/view/upload-and-download-instance

And of course, be aware that in some cases, this isn't desirable from a security standpoint, as this allows users to bypass validation rules, change part of the instance they normally don't have access to, or even change the structure of the instance in ways that can can cause problems to other software using that data.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet