
I've already shared a tons of tricks related to Blogger Contact Form.This one is somehow related to last post I'd published about Blogger contact form.In this post I am going to tell that when a user do not write E-mail or description in form then a message will be shown in a dialog or alert window.As it is shown in the image above,so lets begin with it.
If you do not have Jquery,then add the following line just after <head>.
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>
Then add the following script just before </head>
<script type='text/javascript'>//<![CDATA[Replace the Yellow text for E-mail error and Orange for description error.
$(function(){
$('.contact-form-button-submit').click(function(){
$('.contact-error,.contact-success').hide();
var email="Cowboy! Provide the correct E-mail.";
var description="Whats your problem Sir write in description box.";
if($('.contact-form-error-message-with-border').text()=="A valid email address is required."){
alert(email);
$('.contact-form-error-message-with-border').hide();
}
else if($('.contact-form-error-message-with-border').text()=="Message field cannot be empty."){
alert(description);
$('.contact-form-error-message-with-border').hide();
}
else{
}
});
});
//]]></script>
Holla! If you didn't get anything,we are waiting for comments.
Post A Comment:
0 comments: