Is it possible to add two checkboxes to a contact form in Webflow, where one checkbox must be selected before the form can be submitted?

Published on
September 22, 2023

Yes, it is possible to add two checkboxes to a contact form in Webflow where one checkbox must be selected before the form can be submitted. Here's how you can achieve this:

  1. Start by adding the checkboxes to your contact form. You can use Webflow’s form elements like "Checkbox" or "Checkbox Group" to add the checkboxes to your form.

  2. Once you have the checkboxes added, you need to set up a custom validation rule to ensure that one checkbox is selected before the form can be submitted. To do this, follow these steps:

  • Select the checkbox element that you want to make mandatory.
  • In the Element Settings panel, click on the "Add Field Validation" button.
  • Select the "Required" option from the dropdown menu.
  • Repeat the above steps for the other checkbox if you have multiple checkboxes.
  1. Now, when a user tries to submit the form without selecting the mandatory checkbox, Webflow will show an error message indicating that the field is required.

  2. To customize the error message, select the checkbox element and go to the Error State in the Element Settings panel. Here you can modify the error message to suit your needs.

  3. You can also style the checkboxes and the error message using Webflow's built-in design tools or custom CSS to match the look and feel of your website.

By following these steps, you can add two checkboxes to a contact form in Webflow where one checkbox must be selected before the form can be submitted. This ensures that users provide the necessary information and reduces the chances of incomplete form submissions.

Additional Questions:

  1. How do I add custom validation rules to a form element in Webflow?
  2. Can I style the checkboxes and error messages in Webflow?
  3. Is it possible to add more than two checkboxes to a contact form in Webflow?