-
I have a field group that I want to toggle on and off with a checkbox. Coming from an Angular background I'm making all my fields as their own individual files to import and orchestrate together where needed so none of their instances of use are hardcoded. How can I listen to the value of the checkbox and dig down into the imported field group and change the 'hidden' property's value accordingly? Is this something we can currently do? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @Optiq01 — great question! There are a lot of ways that this could be accomplished. Firstly, have you seen the Conditional Logic feature yet? Your use case of having a checkbox to toggle a field set on and off is exactly why we built it. See this screen capture for a similar implementation: conditional-logic.mp4Now, this feature only shows and hides field groups. Alternatively, if you need to change the values of existing fields when some other field is modified, then you can use either a field hook, which allows you to set a field's value dynamically based on other field values, or you can create a custom field component and utilize our forms' hooks, which gives you access to both send and receive values of any field in your form, wherever you want. Here is another discussion that references this: |
Beta Was this translation helpful? Give feedback.
Hey @Optiq01 — great question!
There are a lot of ways that this could be accomplished. Firstly, have you seen the Conditional Logic feature yet? Your use case of having a checkbox to toggle a field set on and off is exactly why we built it.
See this screen capture for a similar implementation:
conditional-logic.mp4
Now, this feature only shows and hides field groups. Alternatively, if you need to change the values of existing fields when some other field is modified, then you can use either a field hook, which allows you to set a field's value dynamically based on other field values, or you can create a custom field component and utilize our forms' hooks, which gives you access …