How to make a webform field required

If you've created a Web to Contact or Web to Lead webform, you'll want to make some of the fields they're filling out required. For example, making an email address required will allow you to contact a Lead with more information now that you know they're interested.

To make your fields required, you will need to work with the webform's HTML. 

To make a webform field required

  1. Go to System Settings. Select Web to Contact or Web to Lead.
  2. If you haven't already done so, tick the box for Enable Web to Contact or Enable Web to Lead.
  3. Scroll down to HTML FOR YOUR WEBSITE. Click Create HTML For Your Website to open the form builder window.
    HTML_web1.png
  4. Before you copy the HTML code to paste on your website, you will need to go through each line of code and find the fields you want to make required. HTML_web2.pngSo what are you looking for? Here's an example of the First Name field:HTML_web3.png

    <label for="insightly_firstName">First Name: </label>
    <input id="insightly_firstName" name="FirstName" type="text"/>
    <br/>

  5. To make the field required, after type="text", but before  /><br/>, add a space and type required.
    HTML_web5.png
    HTML_web4.gif
  6. After adding this to every field you want to be required, click the X in the top right corner and finish creating your webform.
    HTML_web6.png

Was this article helpful?