Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
funtion formCheck(form) {
var sucess = true;
// validate form fields here
// change sucess to false if validation failed.
if (sucess) {
// disable the submit button. e.g. form.submit.disable = ture;
return true;
} else
return false
}
}
<script language="javascript">
function formCheck(form) {
var ok = true;
if (trim(form.name.value) == "")
ok = false;
if (trim(form.phone.value) == "")
ok = false;
if (trim(form.email.value) == "")
ok = false;
if (ok) {
form.submit.disabled = true;
// comment out the following two lines if you want to preseve the form after submittion
document.getElementById('feedbackForm').style.display='none';
document.getElementById('thankyou').style.display='block';
return true;
} else {
alert('Please complete all required field');
return false;
}
}
function trim(s) {
return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
}
</script>
<div id='feedbackForm'>
<form name="feedback" method="POST" onsubmit="return formCheck(this);" action="mailto:info@eurolinesalons.com">
Name: <input type="text" name="name" /><br />
Phone: <input type="text" name="phone" /><br />
email: <input type="text" name="email" /><br />
<input type="submit" name="submit" value="submit"/>
</form>
</div>
<!-- show this message after the form is submitted -->
<div id='thankyou' style="display:none">
Thank you for your feedback.
</div>