Validation In Mautic Form

Hello
Want To Know How Can I Add Validation In Email Address In Mautic Form i.e I Want To Add Validation Like Only Domain Emails Is Allowed Like info@mohdaquib.com & No Gmail Id’s Are Allowed.
How Can I Achieve That ?

So I’ve been thinking about this problem a lot. I don’t know much about php but I don’t see any way to get custom validation without a plug-in. There’s two answers that are sort of satisfactory, both of them use JavaScript:

  1. Inject and implement front end validation on the page you’re hosting the form

  2. Use another form plugin where you can control validation that integrates with mautic (there’s a few) but inject an on submit js that correctly submits the email address (if you’re collecting one) before the form is submitted so that the anonymous contact is correctly merged.

(2) is only useful if you’re relying on the form to identify the contact.

Good luck!

Ok Sure I Will Try These Methods.
Thank You For The Help

Also Can You Please Explain What Is The Use Of This Field In Mautic Forms.

Capture

The way I understand this field can be shown by an example. Let’s say you’re running a competition where users have to submit the details of 3 friends to win some tickets to an event.

So on some previous page you’ve submitted your own details. Now we land a page where this kind of field has 3 as it’s value. Remember, we want them to enter friend details one at a time. Here’s the user flow:

  1. User submits the form 3 times.

  2. At the third submission, an SMS is sent to them (with a link) where they must complete some action and get a code.

  3. That code can then be entered in this field to unlock some discount.

So basically it’s there to unlock fields where you’re trying to encourage multiple submissions.

show after x submissions.

if you set 2 (two times), this field will show to the contact the second time that contact fill out the form. this is a really awesome feature.

here’s how I usually do this.

I want to collect three data from a contact, email, first name and phone number.

the first time a contact visits my web, she will fill in one field: the email field. if tomorrow she visits again, she’ll see two fields, name and email.

You can do this in all of your forms.

go to configuration, from settings and set do not accept from these domains.

image