Easy Feedback Form On Page Bottom Using jQuery HTML And CSS.

Friday, Apr 7, 2017

Tags:- jQuery HTML CSS


In this tutorial we will create a Sliding Feedback form that is fixed and placed in Bottom of a webpage using jQuery,HTML and CSS.You may also like create newsletter signup form using jQuery.


See Demo
Feedback Form


To Create Easy Feedback Form On Page Bottom It Takes Two steps:-

  1. Make a HTML file and write markup and script for Feedback Form
  2. Make a CSS file and define styling for Feedback Form


Step 1.Make a HTML file and write markup and script for Feedback Form

We make a HTML file and save it with a name feedback.html

<html>
<head>
<link rel="stylesheet" type="text/css" href="feedback_style.css">
<script type="text/javascript" src="jquery.js">
<script type="text/javascript">

$(document).ready(function(){
  $("#feedback_button").click(function(){
    form();
  });
});
	
function form()
{
  $("form").slideToggle();
}
</script>

</head>

<body>

  <h1>Easy Feedback Form On Page Bottom Using jQuery,HTML And CSS</h1>

  <div id="form">
    <p id="feedback_button">Feedback</p>
    
	<form method="post" action="">
      <input type="text" id="name" placeholder="Name">
      <br>
      <input type="text" id="email" placeholder="Email">
      <br>
      <textarea id="feedback" placeholder="Feedback"></textarea>
      <br>
      <input type="submit" id="submit_feedback" values="Submit">
    </form>
  </div>

</body>
</html>

In this step we make a feedback form and and whenever the user want to give feedback he clicks on feedback para and display the form we use jQuery slideToggle(); function for hide and display the form.You may also like submit form without page refresh using ajax.



Step 2.Make a CSS file and define styling for Feedback Form

We make a CSS file and save it with name feedback_style.css.

body
{
	background-color:#E6E6E6;
	font-family:helvetica;
	height:2000px;
}
h1
{
	text-align:center;
	margin-top:150px;
	color:#819FF7;
	width:600px;
	margin-left:200px;
}
#form
{
    position: fixed;
	bottom: 0px;
	left:40%;
	width:250px;
	border:2px solid green;
	padding:0px;
}
#form p
{
	margin:0px;
	background-color:green;
	text-align:center;
	color:#CED8F6;
	padding:10px;
	font-size:20px;
	font-style:oblique;
	cursor:pointer;
}
form
{
	display:none;
}
input[type="text"]
{
	width:220px;
	margin-left:15px;
	height:35px;
	margin-top:10px;
	padding:5px;
	border-radius:5px;
	border:2px solid silver;
}
textarea
{
	width:220px;
	margin-left:15px;
	height:100px;
	margin-top:10px;
	padding:5px;
	border-radius:5px;
	border:2px solid silver;
	font-family:helvetica;
}
#submit_feedback
{
	width:120px;
	margin-left:65px;
	background-color:#A4A4A4;
	border:none;
	color:white;
	height:35px;
	font-size:18px;
	margin-top:10px;
	border-radius:5px;
}

Thats all, this is how to Create an Easy Feedback Form On Page Bottom Using jQuery,HTML and CSS. You can customize this code further as per your requirement. And please feel free to give comments on this tutorial.

Join Us With Our 21000+ Subscribers And Get Our Latest Tutorials Update Via Email