1. Home
  2. Docs
  3. Lead Tracking
  4. Form Tracking
  5. Why does my Lead not Contain all my Form Data?

Why does my Lead not Contain all my Form Data?

If you are receiving form submissions without all the form data filled in, users are submitting the form in that state. WhatConverts processes the form submission if there is at least one value after the user submits the form. If the form requires the user to go back and fill out missing fields, WhatConverts will again process the form submission. So you may end up with two leads from the same user.

To address this issue, we suggest implementing a required attribute on form fields that are required. There are three ways that you can require a field be submitted that WhatConverts can identify. When present, it lets us know the form field must be filled out before the form can be processed.

  • Add a “required” attribute.
    <input name="first_name" type="text" required>
  • Add a class attribute with a “required” value.
    <input name="first_name" type="text" class="required">
  • Add an aria-required attribute with a “true” value.
    <input name="first_name" type="text" aria-required="true">

Using Regular Expressions to Validate Data

A regular expression, or regex, can be used to check for form fields and validate the data in the field itself. It can be something such as an email or a number. WhatConverts honors the Regex pattern if it is set.

An example of validating an email address in your form:

<input type="email" name="email" pattern="^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)" required>