You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Is there any way I can get the whole form with values changed by the user?
In my case, I have to maintain the version of the forms with changed data.
Thank you
The text was updated successfully, but these errors were encountered:
sushil7271
changed the title
Get changed value
Get Whole form in JSON with changed value
Jun 27, 2020
The preferred way to collect data from the form is via the:
List<FormItemValue> data = formManager.getFormData()
As described in readme:
It contains a list of all the properties which were marked as a mutable in a component parser definition. In default components those are the properties that are expected to be changed by a user. Each item contains id of the source element, property name, and property value. To submit the form you usually want to serialize this list and send it back to your server.
This was useful in our projects because we didn't want to send the whole form back (because it is a lot of data that server already knows about) so we were sending only those triplets.
Unfortunately, there is no functionality of serializing the model tree back to the JSON - this library cares only about deserialization. However, I think this is achievable without any modification of the library. You just need your root FormElement and use the Map<String, Property> properties property to recursively traverse the whole model tree and create a JSON document with the updated values.
Hi,
Is there any way I can get the whole form with values changed by the user?
In my case, I have to maintain the version of the forms with changed data.
Thank you
The text was updated successfully, but these errors were encountered: