Block other fields/items if a checkbox is not checked.
View demo projectCreating the Make.com Scenario
1. Download the JSON blueprint below to get stated.
2. Navigate to Make.com and Create a New Scenario...
![](https://cdn.prod.website-files.com/5bbfaf3252489b4c484ba9b9/648c5b1fbc7994f029551c78_Screen%20Shot%202023-06-16%20at%208.51.21%20AM.jpg)
3. Click the small box with 3 dots and then Import Blueprint...
![](https://cdn.prod.website-files.com/5bbfaf3252489b4c484ba9b9/648c5b29e80e81cad00f11c8_Screen%20Shot%202023-06-16%20at%208.51.33%20AM.jpg)
4. Upload your file and voila! You're ready to link your own accounts.
Need help with this MemberScript?
All Memberstack customers can ask for assistance in the 2.0 Slack. Please note that these are not official features and support cannot be guaranteed.
Join the 2.0 SlackHow to Show a Webflow Form Field Only when a Checkbox is Checked
Memberscripts needed:
Tutorial:
Cloneable:
https://webflow.com/made-in-webflow/website/ios-toggle-form
![](https://cdn.prod.website-files.com/5c2a9a234fdbba7439c48fa4/65bce1cba25b3258b621e0e2_Screenshot%202024-02-02%20at%2013.36.07.webp)
Why/When would you need to show a Webflow Form Field only when a checkbox is checked?
- Improve the user experience by disabling irrelevant form fields unless a checkbox is checked.
Sometimes when asking users to fill out a form, you may need to apply some conditional logic.
For example, if you’re using checkboxes, some fields may become irrelevant unless the checkboxes are checked, so users shouldn’t need to fill out those fields anymore. As such, you’ll want to disable those fields.
That’s exactly what we’re going to do with MemberScript #54 below.
Showing a form field only when a checkbox is checked in Webflow forms
To show form fields only when a checkbox is checked in a Webflow form, we’re going to use MemberScript #54 – Checkbox Form Field Logic. Follow the link to get the code you’ll need to add to your page and watch a video tutorial on how to set everything up.
Setting it up
The first thing you’ll need to do is build out the form itself and style it however you want.
Once you’ve added all the fields, select the checkbox and add the following attribute to it:
- ms-code-field-logic-trigger=”email-preferences”
The value can be anything you want.
Then select the fields you want that checkbox to disable and add the following attribute to it:
- ms-code-field-logic-target=”email-preferences”
Keep in mind that the value needs to match the value of the checkbox’s attribute.
For example, if you’ve got multiple checkboxes, each enabling or disabling their own set of fields, you need to match the values of the attributes of the disabled fields with their corresponding checkbox.
Making it work
Now that you’ve got the form set up and you’ve created the show/hide buttons, all you need to do is add the MemberScript #54 custom code to your page, before the closing body tag.
You’ll notice at the beginning of the custom code there’s a CSS class called “disabled.” That class defines the inactive fields, so you can go ahead and style them however you like.
Conclusie
That’s everything, you can now go ahead and test your form.
If you want to use our demo project to get you started, just click the button below to add it to your Webflow site.
![](https://cdn.prod.website-files.com/5c2a9a234fdbba7439c48fa4/65bce164fcf97faf131c6955_IX38iwJQEk6bYHsXqu0dI1tVwGp2uUTBMRxa2KyWtBLLzKcPPzfKaRoS6LAK2PfuJLc35kcP7j9vd8bG8onX09CwicUa-uR1avfLp-Dl2u-tVHVYereAesP4STwIjMEx--0Zc_vebuekYU3ID-iFiE8.webp)
Our demo can help you add a form with checkboxes that enable or disable certain fields within it.
Take me to the Script!