Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create HTML form for public use #810

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions Program's_Contributed_By_Contributors/HTML Designs/Portfolio/HTML form
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<html>
<head>
<title>Student Submission Form</title>

<script>

function isValidEmail() {

var email = document.getElementById('studentEmail');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

if (!filter.test(email.value)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
}

function isSubmissionValid() {
var fname =
document.forms["RegForm"]["First Name"];
var lname =
document.forms["RegForm"]["Last Name"];
var email =
document.forms["RegForm"]["EMail"];
var phone =
document.forms["RegForm"]["Telephone"];
var what =
document.forms["RegForm"]["Subject"];
var password =
document.forms["RegForm"]["Password"];
var address =
document.forms["RegForm"]["Address"];

if (fname.value == "") {
window.alert("Please enter your first name.");
fname.focus();
return false;
}

if (lname.value == "") {
window.alert("Please enter your last name.");
lname.focus();
return false;
}

if (address.value == "") {
window.alert("Please enter your address correctly.");
address.focus();
return false;
}

if (email.value == "") {
window.alert(
"Please enter a valid e-mail address for receive materials of course.");
email.focus();
return false;
}

if (phone.value == "") {
window.alert(
"Please enter your available telephone number.");
phone.focus();
return false;
}

if (password.value == "") {
window.alert("Please enter strong password");
password.focus();
return false;
}

if (what.selectedIndex < 1) {
alert("Please enter your prefered subject to receive materials.");
what.focus();
return false;
}

return true;
}
</script>

<style>
div {
box-sizing: border-box;
width: 100%;
border: 100px solid black;
float: left;
align-content: center;
align-items: center;
}

.discription{
font-family: Georgia, serif;
font-size: 21px;
letter-spacing: -0.2px;
word-spacing: 2px;
color: #000000;
font-weight: normal;
text-decoration: none;
font-style: normal;
font-variant: normal;
text-transform: none;
}

#topic {
color: #FFFFFF;
background: #333333;
text-shadow: 0 -1px 4px #FFF, 0 -2px 10px #ff0, 0 -10px 20px #ff8000, 0 -18px 40px #F00;
color: #FFFFFF;
background: #333333;
}


form {
margin: 0 auto;
width: 600px;
}
</style>
</head>

<body>
<h1 id="topic" style="text-align: center;">Student Submission Form</h1>
<p class ="discription" >Every student must need to fill this form to get a access for the learning management system. Please responsible for provide valide details. Otherwise your receiving materials may be missplaced. </p>
<form name="RegForm" >
<p>First Name: <input id="" type="text"
size="65" name="First Name" /></p>
<br />
<p>Last Name: <input type="text"
size="65" name="Last Name" /></p>
<br />
<p>Address: <input type="text"
size="65" name="Address" />
</p>
<br />
<p>E-mail Address: <input type="text"
size="65" name="EMail" id="studentEmail" onblur="isValidEmail()"/></p>
<br />
<p>Password: <input type="text"
size="65" name="Password" /></p>
<br />
<p>T.P.Number: <input type="text"
size="65" name="Telephone" /></p>
<br />

<p>
Select Prefered Subject
<select type="text" value="" name="Subject">
<option>Artifitial inteligent</option>
<option>Logic Programming</option>
<option>Data Mining</option>
<option>Augmented Reality</option>
<option>Virtual Reality</option>
</select>
</p>
<br />
<br />
<p>Special Notes: <textarea cols="55"
name="Comment"> </textarea></p>
<p>
<button onclick="isSubmissionValid()"
value="send" name="Submit" >Check the Form</button>

</p>
</form>
</body>
</html>