MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b1536/advancedfunctions.co/matchingQuiz/
File Upload :
Current < : /hermes/sb_web/b1536/advancedfunctions.co/matchingQuiz/signup.html

<html>
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src='https://advancedfunctions.co/genericWebsiteCode/googleSheetsPortal.js'></script>
<script src='https://advancedfunctions.co/genericWebsiteCode/styleSheet.js'></script>
<script src='https://advancedfunctions.co/genericWebsiteCode/searchBarMultiple.js'></script>
<script src='https://advancedfunctions.co/genericWebsiteCode/gui.js'></script>
</head>

<body>
<div style='text-align:center;font: 40px Calibri;padding:20px;'>Matching quiz sign up</div>
<br>
<input class='textboxAsLine' id='firstName' placeholder='First name' autocomplete='off'></input>
<br>
<input class='textboxAsLine' id='lastName' placeholder='Last name' autocomplete='off'></input>
<br>
<input class='textboxAsLine' id='email' placeholder='Enter email address' autocomplete='off'></input>
<br>
<input class='textboxAsLine' type='password' id='password' placeholder='Enter password' autocomplete='off'></input>
<br>
<input class='textboxAsLine' type='password' id='reEnterPassword' placeholder='Re-enter password' autocomplete='off'></input>
<br>
<input class='textboxAsLine' id='statusDisplay' placeholder='Status' autocomplete='off' readonly></input>
<br>

<div style='text-align:center;font: 40px Calibri;padding:20px;cursor:pointer;border:solid 1px;margin:40px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;margin-bottom:80px' onclick='javascript:signup()'>Submit</div>

</body>

<script>
var googleSheetsPortalScript='https://script.google.com/macros/s/AKfycby_4XdHG0oVLpKuPSD8Ftkl1Zns5M-ZPplNzjal_qOl0jbb2Hpu_3kTpVNQLuvhP0rQuQ/exec';

function signup(){
var safeToSend=true;
if(getValue('password')!=getValue('reEnterPassword')){
setValue('statusDisplay','Passwords do not match');safeToSend=false;}

if(getValue('password')==''){
setValue('statusDisplay','Invalid password');safeToSend=false;}

if(getValue('email')==''){
setValue('statusDisplay','Invalid email');safeToSend=false;}


if(getValue('firstName')==''){
setValue('statusDisplay','Invalid first name');safeToSend=false;}


if(getValue('lastName')==''){
setValue('statusDisplay','Invalid last name');safeToSend=false;}

setValue('statusDisplay','Processing...');
sendDataToGoogleSheets(['addStudent',getValue('firstName'),getValue('lastName'),getValue('email'),getValue('password')],googleSheetsPortalScript);
}

function receiveDataFromGoogleSheets(){
setValue('statusDisplay',getDataFromGoogleSheetsAsArray()[0]);
}
</script>

</html>