SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with order form not emailing total

    I have an order form that calculates the total, but the total is saved in a <div> and not in the form so when I hit submit, I get everything emailed except the total. Any ideas on how I fix this?

    Here is the link: APP

    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>M'Prints Estimate</title>
        <script type="text/javascript" src="js/formcalculations.js"></script>
        <link rel="stylesheet" href="themes/mprints.min.css" />
    		<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile.structure-1.1.0.min.css" />
    		<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    		<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
    </head>
    
    <body onload='hideTotal()'>
    
        <div id="wrap">
            <form action="" id="estimateform" onsubmit="return false;">
            <div>
            <div class="cont_details">
                	<fieldset>
                    <legend>Contact Details</legend>
                     <label for='date_created'>Date Created</label>
                    <input type="text" id="date_created" name='date_created' />
                    <br/>
                    <label for='customer_name'>Customer Name</label>
                    <input type="text" id="customer_name" name='customer_name' />
                    <br/>
                    <label for='customer_contact'>Customer Contact</label>
                    <input type="text" id="customer_contact" name='customer_contact' />
                    <br/>
                    <label for='customer_email'>Customer Contact Email</label>
                    <input type="text"  id="customer_email" name='customer_email'/>
                    <br/>
                     <label for='opportunity_name'>Opportunity Name</label>
                    <input type="text"  id="opportunity_name" name='opportunity_name'/>
                    <br/>
                     <label for='due_date'>Date Order Due to Customer</label>
                    <input type="text"  id="due_date" name='due_date'/>
                    <br/>
                    </fieldset>
                </div>
                <div class="cont_order">
                   <fieldset>
                    <legend>Make your estimate!</legend>
                    <label >Colors</label>
                    <label >Front</label>
                    <select id="front" name='front' onchange="calculateTotal()">
                    <option value="None">Select</option>
                    <option value="One">One</option>
                    <option value="Two">Two</option>
                    <option value="Three">Three</option>
                    <option value="Four">Four</option>
                    <option value="Five">Five</option>
                    <option value="Six">Six</option>
                    <option value="Seven">Seven</option>
                   </select>
                    <br/>
                    <label >Back</label>
                    <select id="back" name='back' onchange="calculateTotal()">
                    <option value="None">Select</option>
                    <option value="One">One</option>
                    <option value="Two">Two</option>
                    <option value="Three">Three</option>
                    <option value="Four">Four</option>
                    <option value="Five">Five</option>
                    <option value="Six">Six</option>
                    <option value="Seven">Seven</option>
                   </select>
                    <br/>
                    <label >Other</label>
                    <select id="other" name='other' onchange="calculateTotal()">
                    <option value="None">Select</option>
                    <option value="One">One</option>
                    <option value="Two">Two</option>
                    <option value="Three">Three</option>
                    <option value="Four">Four</option>
                    <option value="Five">Five</option>
                    <option value="Six">Six</option>
                    <option value="Seven">Seven</option>
                   </select>
                    <br/>
                    
                    <label >Screens (Front)</label>               
                    <select id="screens_front" name='screens_front' onchange="calculateTotal()">
                    <option value="None">Select</option>
                    <option value="One">One</option>
                    <option value="Two">Two</option>
                    <option value="Three">Three</option>
                    <option value="Four">Four</option>
                    <option value="Five">Five</option>
                    <option value="Six">Six</option>
                    <option value="Seven">Seven</option>
                   </select>
                    <br/>
                  
                    <label >Art Hours</label>
                    <select id="art" name='art' onchange="calculateTotal()">
                    <option value="One">One</option>
                    <option value="Two">Two</option>
                    <option value="Three">Three</option>
                    <option value="Four">Four</option>
                    <option value="Five">Five</option>
                   </select>
                    <br/>
                    <label >Color Changes</label>
                    <select id="color_change" name='color_change' onchange="calculateTotal()">
                    <option value="None">None</option>
                    <option value="One">One</option>
                    <option value="Two">Two</option>
                    <option value="Three">Three</option>
                    <option value="Four">Four</option>
                    <option value="Five">Five</option>
                   </select>
                    <br/>
                    <p>
                    <label for='includerushs' class="inlinelabel">Rush</label>
                   <input type="checkbox" id="includerushs" name='includerushs' onclick="calculateTotal()" />
                   </p>
                   
                    <p>
                    <label class="inlinelabel" for='includeless_than_minimum'>Less Than Minimum</label>
                    <input type="checkbox" id="includeless_than_minimum" name="includeless_than_minimum" onclick="calculateTotal()" />
                    </p>
                    <div id="totalPrice"></div>
                    
                    </fieldset>
                </div>
                
                <input type='submit' id='submit' value='Submit' onclick="calculateTotal()" />
            </div>  
           </form>
    	</div><!--End of wrap-->
    
    </body>
    </html>

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you calculate the total, copy its value into a hidden form element.
    Tab-indentation is a crime against humanity.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •