orbeon

Orbeon Forms: Split Text into Control Fields


We are pasting the following text into a Plain Text Area control:

{ "FIELD1":VALUE1, "FIELD2":VALUE2, "FIELD3":VALUE3, "FIELD4":VALUE4 }

Then we need to unpack this data into separate fields within the form.

How can we achieve this?

Many thanks in advance.

PeteA


Solution

  • If the user-entered value is in JSON format, you can also use the xxf:json-to-xml() function, which makes this both easier and more robust.

    See the function in action

    For reference: