step one of form

This commit is contained in:
Chris Smith
2019-03-03 19:38:52 -06:00
parent 457b846a0c
commit 6c5bf1c2a5
2 changed files with 169 additions and 116 deletions

174
index.php
View File

@@ -1,127 +1,71 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Bitter" rel="stylesheet">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<div class="website">
<div class="gridStyle container">
<div class="text-center">
<h4 class="pad-25-top">Nature's Classroom Institute & Montessori School Presents</h4>
<img src="/images/logo.png" alt="Dinner in the Woods Event Logo">
<h1>Dinner in the Woods</h1>
<h5>Live Music · Local Food · Live & Silent Auction · Cabanas</h5>
<h5>Saturday June 1st, 2019 5:00pm-11:30pm</h5>
</div>
<div>
<form>
<title>Dinner in the Woods 2019 - Tickets on sale March 15th!</title>
<h2>Ticket Information</h2>
<p>Are you a current Nature's Classroom Institute & Montessori School Family?</p>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="form-group">
<input type="radio" id="nciFamilyYes" name="nciFamily" value="yes" checked><label for="nciFamilyYes">Yes</label>
<input type="radio" id="nciFamilyNo" name="nciFamily" value="yes"><label for="nciFamilyNo">No</label>
</div>
<!-- Custom styles for this template -->
<link href="https://fonts.googleapis.com/css?family=Bitter" rel="stylesheet">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<div class="form-group">
<label for="eventTicketQty">How many tickets would you like to purchase?</label>
<p>Purchase eight tickets for reserving a table for $X.XXXXX</p>
<input type="number" id="eventTicketQty" name="eventTicketQty" value="0" required> @ $XX per ticket
</div>
<div class="website">
<div class="gridStyle container">
<div class="py-5 text-center">
<h4 class="pad-25-top">Nature's Classroom Institute & Montessori School Presents</h4>
<img src="/images/logo.png" alt="Dinner in the Woods Event Logo">
<h1>Dinner in the Woods</h1>
<h5>Live Music · Local Food · Live & Silent Auction · Cabanas</h5>
<h5>Saturday June 1st, 2019 5:00pm-11:30pm</h5>
<label for="drinkTicketQty">How many drink tickets would you like?</label>
<div><input type="number" id="drinkTicketQty" name="drinkTicketQty" value="0" required> @ $XX per ticket</div>
<label for="eggTicketQty">How many egg pull tickets would you like?</label>
<div><input type="number" id="eggTicketQty" name="eggTicketQty" value="0" required> @ $XX per ticket</div>
<label for="wineTicketQty">How many wine pull tickets would you like?</label>
<div><input type="number" id="wineTicketQty" name="wineTicketQty" value="0" required> @ $XX per ticket</div>
<label for="additionalContribution">Would you like to make an additional contribution?</label>
<div><input type="number" id="additionalContribution" name="additionalContribution" value="0" required></div>
<div>Total $XXXX.XX</div>
<h2>Billing Information</h2>
<label for="firstName">First Name</label>
<div><input type="text" id="firstName" name="firstName" value="" required></div>
<label for="lastName">Last Name</label>
<div><input type="text" id="lastName" name="lastName" value="" required></div>
<label for="address">Address</label>
<div><input type="text" id="address" name="address" value="" required></div>
<label for="city">City</label>
<div><input type="text" id="city" name="city" value="" required></div>
<label for="state">State
<select name="state" id="state">
<option value="AL">AL</option>
<option value="AK">AK</option>
<option value="AR">AR</option>
<option value="AZ">AZ</option>
<option value="CA">CA</option>
<option value="CO">CO</option>
<option value="CT">CT</option>
<option value="DC">DC</option>
<option value="DE">DE</option>
<option value="FL">FL</option>
<option value="GA">GA</option>
<option value="HI">HI</option>
<option value="IA">IA</option>
<option value="ID">ID</option>
<option value="IL">IL</option>
<option value="IN">IN</option>
<option value="KS">KS</option>
<option value="KY">KY</option>
<option value="LA">LA</option>
<option value="MA">MA</option>
<option value="MD">MD</option>
<option value="ME">ME</option>
<option value="MI">MI</option>
<option value="MN">MN</option>
<option value="MO">MO</option>
<option value="MS">MS</option>
<option value="MT">MT</option>
<option value="NC">NC</option>
<option value="NE">NE</option>
<option value="NH">NH</option>
<option value="NJ">NJ</option>
<option value="NM">NM</option>
<option value="NV">NV</option>
<option value="NY">NY</option>
<option value="ND">ND</option>
<option value="OH">OH</option>
<option value="OK">OK</option>
<option value="OR">OR</option>
<option value="PA">PA</option>
<option value="RI">RI</option>
<option value="SC">SC</option>
<option value="SD">SD</option>
<option value="TN">TN</option>
<option value="TX">TX</option>
<option value="UT">UT</option>
<option value="VT">VT</option>
<option value="VA">VA</option>
<option value="WA">WA</option>
<option value="WI" selected>WI</option>
<option value="WV">WV</option>
<option value="WY">WY</option>
</select>
</label>
</form>
</div>
</div>
</div>
<?php include('views/step2.php'); ?>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
<footer class="my-5 pt-5 text-muted text-center text-small">
<p class="mb-1">&copy; <?= date('Y'); ?> Natures Classroom Institute of Wisconsin</p>
</footer>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="/js/main.js"></script>
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function () {
'use strict';
window.addEventListener('load', function () {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function (form) {
form.addEventListener('submit', function (event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
</body>
</html>

109
views/step1.php Normal file
View File

@@ -0,0 +1,109 @@
<div class="row">
<div class="col-md-4 order-md-2 mb-4">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted">FAQs</span>
</h4>
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">How much is the event?</h6>
<small class="text-muted">
<table>
<tr>
<td>Dinner ticket</td>
<td>$<span id="eventTicketPrice">0</span></td>
</tr>
<tr>
<td>Table for eight</td>
<td>$<span id="tablePrice">0</span></td>
</tr>
<tr>
<td>Ticket enhancer (10 pack)</td>
<td>$<span id="ticketEnhancerPrice">0</span></td>
</tr>
<tr>
<td>Childcare</td>
<td>$<span id="childcarePrice">0</span> per child</td>
</tr>
<tr>
<td>Cabana</td>
<td>$<span id="cabanaPrice">0</span></td>
</tr>
</table>
</small>
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">What is included with a ticket?</h6>
<small class="text-muted">Entrance into the event, appetizers, dessert, and dinner is
included. Ticket
enhancers may be purchased for drinks and other onsite activities.
</small>
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">Is anything included with the table purchase?</h6>
<small class="text-muted">Your party will enjoy two bottles of complimentary wine.</small>
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">What is a ticket enhancer?</h6>
<small class="text-muted">Ticket enhancers are used for drinks, the egg pull, and the wine
pull while at the event. It is sold as a 10 pack of tickets.<br/>
<br/>Drinks - 4 tickets
<br/>Wine Pull - 3 tickets
<br/>Egg Pull - 2 tickets
</small>
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">Is childcare offered?</h6>
<small class="text-muted">Only to NCM enrolled students. Childcare will include pizza and
dessert.
</small>
</div>
</li>
</ul>
</div>
<div class="col-md-8 order-md-1">
<h4 class="mb-3">Your Order</h4>
<form class="needs-validation" novalidate>
<div class="mb-3">
<label for="eventTickets">How many tickets would you like to purchase?</label>
<p class="text-muted">$<span id="eventTicketPrice2">0</span> each or purchase eight tickets to
reserve a table for $<span id="tablePrice2">0</span></p>
<input type="number" class="form-control" id="eventTicketQty" name="eventTicketQty" value="1">
</div>
<div class="mb-3">
<label for="enhancerTickets">How many ticket enhancers would you like?</label>
<p class="text-muted">$<span id="ticketEnhancerPrice2">0</span> per 10 pack of tickets.</p>
<input type="number" class="form-control" id="ticketEnhancerQty" name="ticketEnhancerQty">
</div>
<div class="mb-3">
<label for="enhancerTickets">Would you like to make a one-time contribution to support our mission
in teaching independence, mastery of self, and the environment?</label>
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text">$</div>
</div>
<input name="additionalContribution" type="text" class="form-control" id="inlineFormInputGroup">
</div>
</div>
<hr class="mb-4">
<button class="btn btn-primary btn-lg btn-block" type="submit">Continue to checkout</button>
</form>
</div>
</div>