Hi, Does anyone have any idea how to do a dynamic order form? Let me explain. Someone goes to my website and wants me to create a website for them. I have always had trouble charging them the right amount so i wish there was a way the customer could find out how much it will cost for them without having to contact us for a quote first. Therefore i thought some kind of form might be a good idea. They select what they want. For example, they tick boxes saying: Website Design - £75 News Page - £25 CMS Integration - £50 1 Page - £25 2 Pages - £50 3 Pages - £75 6 Pages - £150 Etc. Then on each thing they select the form (or something) adds it up, and at the end, brings them with a total price of what it would cost. Anyone know how to do this? Thanks.
How's this? <form action="#" onsubmit="return false;"> <p> <label><input type="checkbox" name="item" onclick="update(this.form)" value="75.2" /> Website Design - £75</label><br /> <label><input type="checkbox" name="item" onclick="update(this.form)" value="25.69" /> News Page - £25</label><br /> <label><input type="checkbox" name="item" onclick="update(this.form)" value="50" /> CMS Integration - £50</label><br /> <label><input type="checkbox" name="item" onclick="update(this.form)" value="25" /> 1 Page - £25</label><br /> <label><input type="checkbox" name="item" onclick="update(this.form)" value="50" /> 2 Pages - £50</label><br /> <label><input type="checkbox" name="item" onclick="update(this.form)" value="75" /> 3 Pages - £75</label><br /> <label><input type="checkbox" name="item" onclick="update(this.form)" value="150" /> 6 Pages - £150</label><br /> </p> <p> Your Total: £ <input type="text" name="total" id="total" size="10" value="0.00"> </p> </form> <script type="text/javascript"> <!-- function update(formObj) { var total = 0; for (var i=0; i<formObj.item.length; i++) { var myItem = formObj.item[i]; if (myItem.checked) { total += parseFloat(myItem.value); } } var cents = Math.round((total*100) % 100); var dollars = Math.floor(total); var moneyValue = dollars + "." + cents; if (cents == 0) { moneyValue += "0"; } formObj.total.value = moneyValue; } // --> </script> Code (markup):