How do I add required fields to a contact form?

How do I add required fields to a contact form?

Required fields prevent visitors from submitting a form without providing information that is necessary to process their enquiry. Use them only for information you genuinely need.

1. Decide which information is necessary

Review what you need to respond to or process an enquiry.

For a basic contact form, this might be:

  • Name

  • Email address

  • Message

You may also require a phone number or service selection if it is necessary for your business process.

Avoid making optional information mandatory just because it is useful to have.

2. Open your form settings

In your website builder, CMS or form plugin, open the form editor.

Select the field you want to make mandatory and look for an option such as:

Required, Required field or This field is mandatory.

The exact setting depends on the platform you use.

3. Make the requirement clear

Visitors should be able to tell which fields are required before submitting the form.

Use an appropriate visual indicator, such as an asterisk, and provide a suitable explanation if necessary.

For example:

Name *
Email *
Phone
Message *

Make sure the indicator is not the only way the requirement is communicated where this could create an accessibility problem.

4. Add useful validation

Required fields should also check whether the information entered is suitable.

For example:

  • An email field should accept a valid email format.

  • A required text field should not accept an empty submission.

  • A required selection should require the visitor to choose an option.

Do not rely only on a visitor seeing the required-field indicator.

5. Test the form

Try submitting the form while leaving each required field empty.

The form should:

  • Prevent submission.

  • Identify the missing field.

  • Explain what needs to be provided.

  • Allow the visitor to correct the problem.

Then complete all required fields and confirm that the form submits successfully.

Last Updated 2nd February 2026.

Was this article helpful?

We publish our Knowledge Base to help individuals and businesses resolve common issues across websites, advertising platforms, Salesforce and other digital systems.

We regularly review and update our guides, but the platforms, software and services covered can change without notice. As a result, screenshots, settings, features or recommended processes may differ from those available when an article was last reviewed.

The information provided is general guidance and should not be treated as advice specific to your systems or circumstances. UTDS Optimal Choice cannot accept responsibility for errors, data loss, service disruption or other issues resulting from changes made by following these guides.

If you are unsure about any of the steps, particularly where a change could affect live systems, data, tracking or business processes, we recommend speaking to us before making the change. Our team can review your specific setup and provide advice based on the current platform and configuration.

Time for some professional support?

Our team are ready to help. As one of the few digital agencies that is both a registered Salesforce Consulting Partner and Google Partner Agency, UTDS Optimal Choice is expertly positioned to support you across your entire digital landscape.

Related Pages