In this feedback form onpage load will give the popup box on immediately after page load. The popup content or forms will be display here. If client interested to give the feedback they will fill the form. If they will click outside of the popup window the popup box will close automatically.
Here is i am using feedback form, When will fill the feedback form, the form information will go to the particular email id. the following php code will useful to send the form information to mail id.
This type of on load popup box really increased the visibility from the customer. So it is very useful to give the important news and feedback and lead generated forms. Most of the website they are using this types of popup boxes to generate the sales. Here is the source code and demo pages. Please check the demo page, then you can able to know how this process is working.
Code for Display Feedback Form on Page Load.:
<head>
<meta charset=”utf-8″>
<title>Display popup on page load</title>
<link rel=”stylesheet” href=”swc.css”>
<link href=”css/style.css” rel=”stylesheet” type=”text/css” media=”all”/>
<link href=”css/font-awesome.css” rel=”stylesheet”>
</head>
<body>
<div class=”maintext”>
<h2>www.sanwebcorner.com</h2>
</div>
<div id=”boxes”>
<div style=”top: 50%; left: 50%; display: none;” id=”dialog” class=”window”>
<div id=”san”>
<a href=”#” class=”close agree”><img src=”close-icon.png” width=”25″ style=”float:right; margin-right: -25px; margin-top: -67px;”></a>
<div class=”form-body-w3l”>
<form method=”post” action=”mail1.php”>
<div class=”user-text-w3ls”>
<div class=”w3ls-user”>
<label>Fullname</label><br>
<input type=”text” placeholder=”NAME” name=”name” required=”required”>
<span class=”icon2″><i class=”fa fa-user” aria-hidden=”true”></i></span>
</div>
<div class=”w3ls-password”>
<label>Contact Number</label><br>
<input type=”text” placeholder=”CONTACT NUMBER” name=”contactnumber” required=”required”>
<span class=”icon3″><i class=”fa fa-mobile” aria-hidden=”true” style=” font-size: 22px;”></i></span>
</div>
<div class=”clear”></div>
</div>
<div class=”email-w3ls”>
<label>Your e-mail</label><br>
<input type=”email” placeholder=”E-MAIL” name=”emailid” required=”required”>
<span class=”icon1″><i class=”fa fa-envelope” aria-hidden=”true”></i></span>
</div>
<input type=”submit” name=”submit” value=”Signup”>
</form>
</div>
</div>
</div>
<div style=”width: 2478px; font-size: 32pt; color:white; height: 1202px; display: none; opacity: 0.4;” id=”mask”></div>
</div>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js”></script>
<script src=”swc.js”></script>
</body>
</html>
Php File to Send the form information to the particular Email:
if(isset($_POST[‘submit’])){
$to = “admin@sanwebcorner.com”;
$from = “admin@sanwebcorner.com”;
$name = $_POST[‘name’];
$mobile = $_POST[‘contactnumber’];
$email = $_POST[’emailid’];
$subject = “New Enquiry From Website”;
$message = ” nn Name:”.$name .”nn Email : ” . $email .”nn Mobile :”.$mobile.”nn” ;
$headers2 = “Feedback From Website: ” . $email;
mail($to,$subject,$message,$headers2);
echo ‘<script>alert(“Thanks for Sign up…”);</script>’;
echo ‘<script>location.href = “http://rcdcindia.com/race-on-the%20international-tracks/”</script>’;
}
?>
