Often, fields have dependencies on each other, so that when one field is updated, a function gets run that can manipulate the other. Dynamic forms should allow implementers to provide a function that handles these interactions.
Conventions
interactions should live in forms/interactions/* and implement a function that has access to both the field(s) that were changed and the value of the field that that originated the change.
Examples
- Displaying a Total as you add transactions to a form.
- Disabling a field when a checkbox is checked.
Often, fields have dependencies on each other, so that when one field is updated, a function gets run that can manipulate the other. Dynamic forms should allow implementers to provide a function that handles these interactions.
Conventions
interactions should live in
forms/interactions/*and implement a function that has access to both the field(s) that were changed and the value of the field that that originated the change.Examples