lundi 30 mars 2015

Domain blocking in email online form

I need to stop certain domains being entered into the online form, domains such as gmail, yahoo. The reason is they only want business email addresses input.


The page is a html page and the form setup is a usual form action, here is the code of the form-



<form role="form" id="contact-form" method="post">

<div class="form-group">
<label for="name">Name*</label>
<input type="text" name="name" class="form-control" id="name" required/>
</div>
<div class="form-group">
<label for="email">Work Email Address*</label>
<input type="email" name="email" class="form-control" id="email" required />
</div>
<div class="form-group">
<label for="phone">Phone Number*</label>
<input type="text" name="phone" class="form-control" id="phone" required/>
</div>
<div class="form-group">
<label for="company">Company*</label>
<input type="text" name="company" class="form-control" id="company" required/>
</div>
<div class="submit">
<input type="submit" class="btn btn-lg btn-purple-white" formaction="FormToEmail_download.php" formmethod="POST" value="Email us" />
</div>


Where and what can I place so that if the user enters a gmail.com address a simple box appears (like if they do not fill out a required field) saying gmail.com address not accepted, please use your work address.


Thank you.


Aucun commentaire:

Enregistrer un commentaire