Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="//submit.form" onSubmit="return validateForm();">
- <div style="width: 100px;">
- </div>
- <div>
- <div style="float:left"><a href="" id="lnk100" title="form to email"></a></div>
- <script src="https://www.100forms.com/js/FORMKEY:EBTR2NWCLUZ6" type="text"></script>
- </div>
- <div style="display: inline-block; text-align: center; padding-bottom: 18px;width : 450px;">
- <div style=" margin-left : auto; margin-right : auto; width : 49%;">Nome de Contacto:<br/>
- <input type="text" id="data_2" name="data_2" style="width: 100%;" class="form-control"/>
- </div>
- <div style="display: inline-block; text-align: center; padding-bottom: 18px;width : 450px;">
- <div style=" margin-left : auto; margin-right : auto; width : 49%;">E-mail:<br/>
- <input type="text" id="data_4" name="data_4" style="width : 100%;" class="form-control"/>
- </div>
- <div style="display: inline-block; text-align: center; padding-bottom: 18px;width : 450px;">
- <div style=" margin-left : auto; margin-right : auto; width : 49%;">Contacto Telefonico:<br/>
- <input type="number" id="data_1" name="data_1" style="width : 100%;" class="form-control"/>
- </div>
- <div style="padding-bottom: 18px;"><input name="skip_Submit" value="Confirmar" type="submit"/></div>
- </div>
- </div>
- </form>
- <script type="text/javascript">
- function validateForm() {
- if (!validateEmail(document.getElementById('data_4').value.trim())) {
- alert('Email must be a valid email address!');
- return false;
- }
- return true;
- }
- function isEmpty(str) { return (str.length === 0 || !str.trim()); }
- function validateEmail(email) {
- var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,15}(?:\.[a-z]{2})?)$/i;
- return isEmpty(email) || re.test(email);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement