Print this page

How do I make a field required on the web form?

Knowledge Article Number 000005147

I need to make a field required from the web to lead form. How can I do this?


You can have a web developer create javascript code for your web-to-lead form that can dynamically render an error message to the person filling out the form if not all information is entered correctly.

If the validation is done within Salesforce, any forms submitted will be rejected by the database if they do not meet the validation rule criteria. This would prevent the record from being saved correctly.

You can use the word 'Required' at the end of the syntax for the field. It should look like:

<label for="first_name">First Name</label><input id="first_name" maxlength="40" name="first_name" size="20" type="text" Required />

promote demote