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
Guidone edited this page Apr 22, 2023
·
5 revisions
Creating dynamic forms which changes and reacts to user input data (i.e., show or hide fields based on the value of a checkbox) it's just a matter of manipulating the structure of JSON which defines the form.
This can be done programmatically using LetsForm helpers or embedding small chunk of codes calla "transformers" in the JSON:
constform={version: 1,transformer: ` if (values.terms) { enable('really_accept_terms'); } else { disable('really_accept_terms'); } `,fields: [{"name": "terms","component": "checkbox","label": "Accept terms and condition?"},{"name": "really_accept_terms","component": "checkbox","label": "Really accept terms and condition?"}]}
setValue
tbd
Modifiy a value of a field.
Expection of validation fields