Set Value in one field based on value in other field

Have couple of requirements like when we select / change value in one field, need to update value on other field

In attached screenshot, we have field

  1. Type (Enum - match / rewrite),
  2. Match Condition - Enabled only when type mentioned above is match
  3. Rewrite action - Enabled only when type mentioned above is rewrite

Now Enable / Disable is working fine, but error scenario is, when at first we select match then select match condition, then i changed type to rewrite, now match condition should be cleared which is not happening

We are using vue-vanilla 2.5

IssueJsonForms

Hi @rohan.thakare,

Our rules only have an effect on the UI, they don’t modify data.

If you like to change data in multiple fields based on a single input then you can either:

  • implement a custom renderer for the control which not only changes its own data but arbitrary other data in the form too. In this case this would be a custom control for Type
  • listen to the data changes outside of JSON Forms and update the data accordingly