Now streaming live

Custom Form Text Field Validation Not Working


#1

Hi,

We have a custom form on our homepage. For some reason, the form is only validating the email field and not the text fields (First name, Last name). We have set the attributes to required for all fields.

My engineer says it looks like the type="text" attribute is not being recognized for some reason, while the email type is.

We have another form on another page with the same code that is working properly. Any ideas?

https://preview.webflow.com/preview/brightplan-website?preview=4af8ff54d107de76eae60dff06086b41

<form id="early-access-form-temp" action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00D36000000IwD6">
<input type=hidden name="retURL" value="http://www.brightplan.com/contact/contact-success-early-access">

<input class="field-ea w-input" data-name="first_name" id="first_name" maxlength="256" name="first_name" placeholder="First name" type="text" required>
<input class="field-ea w-input" data-name="last_name" id="last_name" maxlength="256" name="last_name" placeholder="Last name" type="text" required>
<input class="field-ea-email w-input" data-name="email" id="email-3" maxlength="256" name="email" placeholder="Email" type="email" required>
<input type=hidden id="00N3600000PVGNo" name="00N3600000PVGNo" title="Type" value="Early Access">

<input class="subscribe-ea-button w-button" id="submit" data-wait="Please wait..." type="submit" data-callback='onSubmit' value="GET EARLY ACCESS">
</form>

#2

Try changing your submit button from

<input class="subscribe-ea-button w-button" id="submit" data-wait="Please wait..." type="submit" data-callback='onSubmit' value="GET EARLY ACCESS">

to

<button class="subscribe-ea-button w-button">GET EARLY ACCESS</button>

#3

Hey @samliew thanks for the reply!

Tried that, still not working. Form still only requires email to be submitted.

We had previously tried other various attributes using instead of , with no luck. My javascript guy also tried various methods using scripts, but for some reason it just won't recognize the text type.


#4

@cyberdave perhaps you can look into this