Higher Education Order Form-20160814_v01

by freedawirl

HTML

<script src="//limonte.github.io/sweetalert2/dist/sweetalert2.min.js"></script>
<link rel="stylesheet" href="//limonte.github.io/sweetalert2/dist/sweetalert2.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container">
  <div class="form-division row">
    <div class="col-md-3 pull-right">
      <a class="back-link" href="/education-order-form" title="Back to MetroWorks Education Section"> ‹ ‹ Go Back</a>
    </div>
    <div class="heading col-md-9">
      <h1 class="form-title">Higher Education Customer Sales Order </h1>
    </div>
  </div>
  <div id="form-wrap">
    <div class="form">
      <div class="form-division row">
        <div class="form-group has-warning col-md-12">
          <span>Account Number </span>
          <input type="text" name="account_number" ektdesignns_nodetype="element" id="account_number" ektdesignns_caption="Account Number" ektdesignns_name="account_number" title="Account Number" placeholder="Enter Order #" ektdesignns_validation="string-req" ektdesignns_datatype="string"
          ektdesignns_basetype="text" ektdesignns_schema="&lt;xs:minLength value=&quot;1&quot;/&gt;" ektdesignns_validate="re:/\S+/" ektdesignns_invalidmsg="Please enter your account number" onblur="design_validate_re(/\S+/,this,'Please enter your account number');"
          class="form-control design_textfield" /> &#160;
        </div>
      </div>
      <hr />
      <h3>Customer Information</h3>
      <div class="form-division row">
        <div class="col-md-6">
          <span class="red">*</span>
          <input type="text" name="contact_name" ektdesignns_nodetype="element" id="contact_name" ektdesignns_caption="Contact Name:" ektdesignns_name="contact_name" title="Contact Name Cannot be blank" placeholder="Contact Name" ektdesignns_validation="string-req"
          ektdesignns_datatype="string"...

JavaScript

// Variables for the Higher-Ed form

var n15_qty_1e = $('.n15_qty_1e').val();
var n15_qty_2e = $('.n15_qty_2e').val();
var n15_qty_3e = $('.n15_qty_3e').val();
var n15_qty_4e = $('.n15_qty_4e').val();

var n15_p_1e_single_price
var n15_p_2e_single_price
var n15_p_3e_single_price
var n15_p_4e_single_price

//var n15_total_price_1e = $('.n15_total_price_1b').val();
//var n15_total_price_2e = $('.n15_total_price_2b').val();
//var n15_total_price_3e = $('.n15_total_price_3b').val();
//var n15_total_price_4e = $('.n15_total_price_4b').val();

var n15_total_price_1e = $('.n15_total_price_1e').val();
var n15_total_price_2e = $('.n15_total_price_2e').val();
var n15_total_price_3e = $('.n15_total_price_3e').val();
var n15_total_price_4e = $('.n15_total_price_4e').val();


n15_total_price_1e = n15_total_price_1e.replace("$", "");
n15_total_price_2e = n15_total_price_2e.replace("$", "");
n15_total_price_3e = n15_total_price_3e.replace("$", "");
n15_total_price_4e = n15_total_price_4e.replace("$", "");

var n15_total_price_e
var n15_qty_total_e
var n15_subtotal_price_e
var n15_final_price_e

// Variables for both forms

var n15_processing = 12.00;



// Second form Jquery

$('.n15_qty_1e, .n15_qty_2e, .n15_qty_3e, .n15_qty_4e, .n15_single_price_4e').on('change keyup', function() {

  n15_qty_1e = $('.n15_qty_1e').val();

  // Setting Price

  n15_p_1e_single_price = 27.00;

  $('.n15_single_price_1e').val('$' + n15_p_1e_single_price.toFixed(2));

  n15_total_price_1e = n15_qty_1e * n15_p_1e_single_price;

  ($(this).closest("tr").find('.n15_total_price_1e').val('$' + n15_total_price_1e.toFixed(2)));

  // Jquery for Form 2 second table row

  n15_qty_2e = $('.n15_qty_2e').val();

  // Setting Price

  n15_p_2e_single_price = 40.00;

  $('.n15_single_price_2e').val('$' + n15_p_2e_single_price.toFixed(2));

  n15_total_price_2e = n15_qty_2e * n15_p_2e_single_price;

  ($(this).closest("tr").find('.n15_total_price_2e').val('$' + n15_total_price_2e.toFixed(2)));

  // Jquery for...