Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It appears the same as the data parser.

Advanced

Using React components

...

1. How do I use onUpdate in the form widget?

onUpdate is a callback function invoked in the Form Source when any form fields get updated. It gives users access to currentValues following the change to update other values and the form’s fieldSettings. currentValues are already inputted in the available fields.

Ex.

Code Block
onUpdate: function (arg) {
   if (arg.currentValues.state) {
        var cityOptions = stateToCity[arg.currentValues.state]
        arg.fieldSettings.city.dropdownOptions = cityOptions
     }
    return arg
},