Created
May 11, 2017 10:26
-
-
Save ravituvar/699e962e7c6aae33b8b35e657e1454f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<style> | |
/* Style inputs with type="text", select elements and textareas */ | |
input[type=text], select, textarea { | |
width: 100%; /* Full width */ | |
padding: 12px; /* Some padding */ | |
border: 1px solid #ccc; /* Gray border */ | |
border-radius: 4px; /* Rounded borders */ | |
box-sizing: border-box; /* Make sure that padding and width stays in place */ | |
margin-top: 6px; /* Add a top margin */ | |
margin-bottom: 16px; /* Bottom margin */ | |
resize: vertical /* Allow the user to vertically resize the textarea (not horizontally) */ | |
} | |
/* Style the submit button with a specific background color etc */ | |
input[type=submit] { | |
background-color: #4CAF50; | |
color: white; | |
padding: 12px 20px; | |
border: none; | |
border-radius: 4px; | |
cursor: pointer; | |
} | |
/* When moving the mouse over the submit button, add a darker green color */ | |
input[type=submit]:hover { | |
background-color: #45a049; | |
} | |
/* Add a background color and some padding around the form */ | |
.container { | |
border-radius: 5px; | |
background-color: #f2f2f2; | |
padding: 20px; | |
} | |
</style> | |
<script> | |
function SendEmail(){ | |
var form = $('form[id=gform]'); | |
$.post($(form).attr('action'), $(form).serialize(), function(json) { | |
alert(json); | |
}, 'json'); | |
return false; | |
}; | |
</script> | |
</head> | |
<body style="margin:0;padding:0"> | |
<form id="gform" action="https://script.google.com/macros/s/AKfycbx3BycZDjTuGMZT3V2CpxOgddqF1EFT-Q9o-vdvw4-mJxPA5cRB/exec"> | |
<label for="fname">First Name</label> | |
<input type="text" id="fname" name="firstname" placeholder="Your name.."> | |
<label for="lname">Last Name</label> | |
<input type="text" id="lname" name="lastname" placeholder="Your last name.."> | |
<label for="country">Country</label> | |
<select id="country" name="country"> | |
<option value="australia">Australia</option> | |
<option value="canada">Canada</option> | |
<option value="usa">USA</option> | |
</select> | |
<label for="subject">Subject</label> | |
<textarea id="subject" name="subject" placeholder="Write something.." style="height:200px"></textarea> | |
<input type="button" onclick="SendEmail();" value="Submit"> | |
</form> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment