HTML - Price Calculator And Email Submission In One Form?
Hello,
I'm trying to put together an online signup form for a children's summer program. I'd like to have a calculator for the total price of classes at the bottom as well as a "submit" button that will email me all entered information. I had tried using cgiemail (http://web.mit.edu/wwwdev/cgiemail/), which was already installed on my server, but my problem was that it sends me information from the "value" fields, which are already used for the price calculator. For instance, the price of each class in my sample is $55, so I have the value field for each choice set to 55. Unfortunately, cgiemail also wants to use the value field, so I would receive a list of "55"s rather than class names. Does anyone have a suggestion for how to fix this? I am very much an amateur at all of this, so if you think there's a better way to set up, I am open to suggestions. Thank you for the help! Matt Code: <form name="classes" onclick="calculate()"> <b>Class Signup Form</b><br><br> <P> <b>Child Info:</b> <TABLE CELLPADDING="1" CELLSPACING="1" WIDTH="550"> <tr><td width="200">Name:</td><td width="350"><INPUT name="childname"></td></tr> <tr><td width="200">Date of Birth:</td><td width="350"><INPUT name="childage" value="mm/dd/yyyy" maxlength="10"></td></tr> <tr><td width="200">Age:</td><td width="350"><select name="childage" STYLE="width: 50px;"> <option value="age5" selected="selected">5</option> <option value="age6">6</option> <option value="age7">7</option> <option value="age8">8</option> <option value="age9">9</option> <option value="age10">10</option> <option value="age11">11</option> <option value="age12">12</option> <option value="age13">13</option> <option value="age14">14</option> </select></td></tr> <tr><td width="200">T-Shirt Size:</td><td width="350"><select name="childshirt" STYLE="width: 50px;"> <option value="shirtxs" selected="selected">XS</option> <option value="shirts">S</option> <option value="shirtm">M</option> <option value="shirtl">L</option> <option value="shirtxl">XL</option></td></tr> <tr><td width="200">Address:</td><td width="350"><INPUT name="childaddress1"></td></tr> <tr><td width="200"></td><td width="350"><INPUT name="childaddress2"></td></tr> <tr><td width="200">City:</td><td width="350"><INPUT name="childcity"></td></tr> <tr><td width="200">State:</td><td width="350"><INPUT name="childstate"></td></tr> <tr><td width="200">Zip:</td><td width="350"><INPUT name="childzip"></td></tr> </TABLE> </p> <p>Allergy/Medication Information:<br><textarea rows="5" cols="50"></textarea></p> <P> <b>Parent/Guardian Info:</b> <TABLE CELLPADDING="1" CELLSPACING="1" WIDTH="550"> <tr><td width="200">Parent 1 Name:</td><td width="350"><INPUT name="parent1name"></td></tr> <tr><td width="200">Daytime Phone:</td><td width="350"><INPUT name="parent1phone"></td></tr> <tr><td width="200">Cell Phone:</td><td width="350"><INPUT name="parent1cell"></td></tr> </TABLE><br> <TABLE CELLPADDING="1" CELLSPACING="1" WIDTH="550"> <tr><td width="200">Parent 2 Name:</td><td width="350"><INPUT name="parent2name"></td></tr> <tr><td width="200">Daytime Phone:</td><td width="350"><INPUT name="parent2phone"></td></tr> <tr><td width="200">Cell Phone:</td><td width="350"><INPUT name="parent2cell"></td></tr> </TABLE><br> <TABLE CELLPADDING="1" CELLSPACING="1" WIDTH="550"> <tr><td width="200">Billing Email:</td><td width="350"><INPUT name="billingemail"></td></tr> <tr><td width="200">Alternate Email:</td><td width="350"><INPUT name="alternateemail"></td></tr> </TABLE> </p> <P> <b>Week 1 Classes</b><br> <TABLE CELLPADDING="1" CELLSPACING="1" WIDTH="550"> <tr><td width="200">9:30 - 10:45</td><td width="350"> <select name="w1c1" STYLE="width: 200px;"> <option value="0" selected="selected">- No Class -</option> <option value="55" name="DoppClass">Mountain Biking</option> <option value="55" name="Class 3">Witchcraft</option> <option value="55" name="DoppClass">Nintendo</option> </select></td></tr> <tr><td width="200">10:45 - Noon</td><td width="350"> <select name="w1c2" STYLE="width: 200px;"> <option value="0" selected="selected">- No Class -</option> <option value="55">Running with Scissors</option> <option value="55">Trapeze</option> <option value="55">Dance</option> </select></td></tr> <tr><td width="200">1:00 - 2:15</td><td width="350"> <select name="w1c3" STYLE="width: 200px;"> <option value="0" selected="selected">- No Class -</option> <option value="55">Clock-Building</option> <option value="55">Monkeys with Hats</option> <option value="55">Trains</option> </select></td></tr> <tr><td width="200">2:15 - 3:30</td><td width="350"> <select name="w1c4" STYLE="width: 200px;"> <option value="0" selected="selected">- No Class -</option> <option value="55">Cricket</option> <option value="55">Crochet</option> <option value="55">Crocodiles</option> </select></td></tr> </TABLE> </p> <p><input type=button name=calculate value="Calculate Total Price" onClick="pricecalculate();"></P> <p>$<input type=text name=txtAnswer> </p> </form> <script language = "javascript"> function pricecalculate(){ var w1c1=eval(document.classes.w1c1.value); var w1c2=eval(document.classes.w1c2.value); var w1c3=eval(document.classes.w1c3.value); var w1c4=eval(document.classes.w1c4.value); document.classes.txtAnswer.value=w1c1 + w1c2 + w1c3 + w1c4; } </script> Similar TutorialsI'm trying to do something so very simple, yet for some reason it has to make itself difficult. I'm trying to do an "application; fill out this form" thingy and a simple submit button to email it to the appropriate person. However, I know that the old HTML version of 'mail-to' just brings up this stupid window to activate your mail program and then *******ize your hard work with a blank body. So I'm trying to do it using PHP. The problem is; there's a billion websites out there that try to explain it, even go so far as to call it 'simple' or 'easy', but they clutter up their code with lengthy examples and it's so unclear what should be changed so that the code will work with 'my' form and not their over-achieving example. Can someone, please, just show me directly and without any self-injected non-sense an "Open Source" version of "Click submit button to email the results of this filled out form" using PHP (which will make it simple and comfortable for anyone that uses it) and I don't have to become a world-renowned programmer just to make it happen... -.- Thanks you! Hi guys, i'm new to the job, and having a bit of bother with some code, ive written the stuff below to give me a submission form (which works great) but when the form is submitted, i need it to link to a page in the same window to thank the customer for submitting, and so i can place a some tracking code into the same page. can someone help me by telling me how to embedd this link? With thanks, AL <form action="mailto:allan.doyle@dalescycles.com?subject=cyclescheme" method=post encType=text/plain> Full name: <input type="text" name="fullname" value="" maxlength="100" /> <br /> E-mail: <input type="text" name="email" value="" maxlength="100" /> <br /> Telephone: <input type="text" name="phone" value="" maxlength="100" /> <br /> Bike: <input type="text" name="bike" value="" maxlength="100" /> <br /> Bike size: <input type="text" name="bikesize" value="" maxlength="100" /> <br /> <input type="submit" value="Submit" /> </form> Working on a web site for my dad's small business. Im temporarily hosting it on Yahoo geocities and the form does not submit to my email as the CGI. I havent learned any server-side languages yet and I dont know how to setup a form submission script. Here is a link to the homepage: http://geocities.com/skalamanga89/espn/ Hey there. I have created the site saskannouncements.ca. If you go to create a post, you'll see I have set up an OK looking submission form. Here's the problem, you see what the people submit is sent to my email. because I'm just using this free thing off the internet. Now what I want, is I want to Posts to be automatically posted to where the posters sent it. How do I set that up? Basically I want it so they automatically post, and I don't have to copy and paste them in each time. I just want to moniter them as they automatically are placed. Can anyone help me on this please? Thanks alot. I really appreciate it. Also if you've got any other pointer's for my new site Feel free to let me know. Looking forward to hearing from you! Hi guys, Can someone please help me with what to do with my forms; I have a form built that when someone clicks submit I want a number of actions to occur: - The information they provided to be emailed to me somehow - A message to pop up saying that the form was successfully submitted. - And to redirect them back to my home page. How do I do this?? What code do I need to use?? And is there some way that I can get the filled out form emailed to me without them having to send it?? (i.e. not using "mailto") Any help here would be really appreciated. Thanks, TroubleShooter..."yeah right!" Hi Everyone, I am at a loss to explain why some of my form submission markup works fine, yet slightly modified markup does not! The markup that works ok with my website is as follows: Code: <td valign="top" background="../images/nav/left_nav_top.gif" height="800" width="131"><img src="../images/nav/invisible_pixel.gif" width="131" height="1" border="0"> <img src="../images/home/left%20nave_graphic.gif" width="131" height="173"> <form name="searchform" action="store_searchresults.asp?strCategory=&strSubCategory=&strThirdCategory" method="post" onSubmit="MM_validateForm('strKeyword','','R');return document.MM_returnValue"> <IMG SRC="../images/nav/left_nav_search.gif" WIDTH=127 HEIGHT=12 ALT="" BORDER=0> <INPUT TYPE="HIDDEN" NAME="strAction" value="search"> <input style="background-color: #FFFFFF;" type="text" name="strKeyword" size="11"> <input type="image" border="0" name="imageField" src="../images/nav/top_search_gob.gif" width="24" height="22"></form></td> However the following markup on the same page does not work consistenty between different browser version. It works fine in IE but it does not work in Firefox. Firefox presents the message "Please enter a keyword" and refuses to submit the form. Code: <form name="searchform" action="store_searchresults.asp?strCategory=&strSubCategory=&strThirdCategory" method="post" onSubmit="MM_validateForm('strKeyword','','R');return document.MM_returnValue"> <input type="hidden" name="strAction" value="search"> <input type="hidden" name="strKeyword" value="LV4"> <input type="image" border="0" name="imageField" src="../images/marquee/LV4403B4.jpg" width="113" height="98"> </form> It is as though Firefox cannot see the "strKeyword" attribute. However IE has not problem with it. Any help with this will be greatly appreciated, as I am at a loss... Thanks for your time Regards David I want a form so a person can type in a story and it can be sent to the database, where users can browse it in the stories section of my site. I have no idea where to start! Hi, I want to put in a form to get queries from the user, like so: Name: Email: Comments: 'Send' button and that it will send the information to my email address which is gmail? Thanks script completed, thx How can I restrict form submission to only the Submit button? I find the forms can be submitted also by the user pressing the "enter" or the "return" key (Users typically use IE or Firefox) By a mouseover the "Submit" button, a final check of data integrity is done as follows.... <INPUT type="submit" value="Submit Form" onmouseover="validate(personal_SS.value,personal_SS.id,personal_lastname.value,personal_lastname.id, personal_firstname.value,personal_firstname.id,personal_Birthdate.value,personal_Birthdate.id)"> <INPUT type="reset" value="Clear form"> Data is 128 bit SSL encrypted function validate(strngSS,x,strngLN,y,strngFN,z,strngBD,w) { if (strngSS== "") {alert("You didn't enter a Social Security Number."); document.ReturnPatientEntry.x.focus(); return; } else { if ((strngSS.length < 9) || (strngSS.length > 9)) {alert("The Social Security Number is the wrong length. Just use numbers, no dashes... like 123456789 not " + strngSS); document.ReturnPatientEntry.x.focus(); return; } else { var illegalChars = /\W\#/; if (illegalChars.test(strngSS)) {alert( "The Social Security Number contains illegal characters. Just use numbers, no dashes or # signs."); document.ReturnPatientEntry.x.focus(); return; } } } validateLN(strngLN,y) validateFN(strngFN,z) validateBD(strngBD,w) } function validateLN(strng,x) { if (strng== "") {alert("You didn't enter a Last Name."); document.ReturnPatientEntry.x.focus(); return; } else { if ((strng.length < 3) || (strng.length > 15)) {alert("The Last Name is the wrong length. Just use letters, no dashes... " + strng); document.ReturnPatientEntry.x.focus(); return; } else { var illegalChars = /\W\#/; if (illegalChars.test(strng)) {alert( "The Last Name contains illegal characters. Just use letters, no dashes or spaces."); document.ReturnPatientEntry.x.focus(); return; } } } } function validateFN(strng,x) { if (strng== "") {alert("You didn't enter a First Name."); document.ReturnPatientEntry.x.focus(); return; } else { if ((strng.length < 2) || (strng.length > 12)) {alert("The First Name is the wrong length. Just use letters, no dashes... " + strng); document.ReturnPatientEntry.x.focus(); return; } else { var illegalChars = /\W\#/; if (illegalChars.test(strng)) {alert( "The First Name contains illegal characters. Just use letters, no dashes or spaces."); document.ReturnPatientEntry.x.focus(); return; } } } } function validateBD(strng,x) { if (strng=="") {alert("Please enter a valid Birthdate"); document.ReturnPatientEntry.x.focus(); return; } else { if ((strng.length<8) || (strng.length>8)) {alert("Please enter your Birthdate in the form mm/dd/yy, not " + strng); document.ReturnPatientEntry.x.focus(); return; } else { var illegalChars=/[\-\.\m\,\ ]/; if (illegalChars.test(strng)) {alert("The Birtdate contains illegal characters, use the format mm/dd/yy, not " + strng); document.ReturnPatientEntry.x.focus(); return; } } } } I know the coding is primitive, but it works. If the "Clear form" button is pressed, multiple consecutive error messages are tripped as the form is cleared. Can I suppress this as well? Thanks, Douglas McKibbin augustasurgery.org I used a tutorial on another website to create a Email Form. But the form doesn't work. Can someone help me work out whats wrong. I also want to add a confirmation page. HTML Code: <form action="mailto:exterminate-tcg@hotmail.co.uk?subject=Join Form" method="post" enctype="text/plain"> <table><tr><td> Name: <INPUT NAME="Name" TYPE="text" SIZE=15 MAXLENGTH=50><BR> Email: <INPUT NAME="Email" TYPE="text" SIZE=20 MAXLENGTH=90><BR> Website URL: <INPUT NAME="Website URL" TYPE="text" VALUE="http://" MAXLENGTH=4555><BR> Birthday: <INPUT NAME="Birthday" TYPE="text" VALUE="dd/mm" SIZE=6 MAXLENGTH=5><BR> Set Colecting: <INPUT NAME="Set Colecting" TYPE="text" SIZE=15 MAXLENGTH=11111><BR> Referred By (Optional): <INPUT NAME="Referred By (Optional)" TYPE="text" SIZE=15 MAXLENGTH=30><BR> Comments?<BR><TEXTAREA NAME="Comments?" ROWS=4 COLS=20></TEXTAREA><BR> </td></tr> <tr><td align=center> <INPUT TYPE="submit" value="submit" style="color: #000000 ; background-color: #FFFAFA "> </td></tr></table> </FORM> Hey guys, I've made a form for my website. It should send the information in my form directly to the emailaddress I added, but it doesn't. I would also like to get some sort of confirmation so that when you have filled in the form and sended it, you get some sort of confirmation that the form was filled in correctly and was send to my emailaddress. Here is the code: HTML Code: <h1>Join us:</h1> <form action="MAILTO:joinus@mysitename.nl" method="post" enctype="multipart/form-data" name="Joinus"> Nickname:<br /> <input type="text" name="name" value="your nickname" /><br /><br /> Age:<br /> <input type="text" name="age" value="your age" /><br /><br /> E-mail:<br /> <input type="text" name="mail" value="your email" /><br /><br /> Name:<br /> <input type="text" name="name" value="your name" /><br /><br /> Main skill:<br /> <input type="text" name="skill" value="your main skill" size="50" /><br /> Country:<br /> <input type="text" name="country" value="your country" /><br /><br /> CoD series: <input type="checkbox" name="name" value="CoD United Offensive" /> CoD United Offensive<br /> <input type="checkbox" name="name" value="CoD Modern Warfare" /> CoD Modern Warfare<br /> <input type="checkbox" name="name" value="CoD Modern Warfare 2" /> CoD Modern Warfare 2<br /> <input type="checkbox" name="name" value="CoD Black Ops" /> CoD Black Ops<br /> <br /><br /> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form> Ok So I was a little premature in adding to my previous post the the form was now working in IE. I've written 2 forms, the first was a very basic general feedback form, asking the user to rate the site as Excellent, Good or Poor, together with a comments field. This is a relaunch of a site than ran into a little disuse and became out of date. (Once the site is live I'll think about adding the details into a topic on this site for you all to see.) The second was as my first post (form redirect) listed. Both were using the method="post" but I'd read that you didn't need this if you were using 'mailto' tag so I removed it. Now it adds the email recipients but removes the email subject and doesn't add the responses into the body of the email. Further reading indicated that for very basic forms the method="get" is better so I changed it. This stopped it working in Chrome. Can't win! Leaving the method out.............still no joy. Hey ho. Will probably get the site host to use Perl (or whatever other they use for other sites they have developed). Benefits? No more headaches for me. Less chance of spammers. Hopefully better security and more likelihood of people using the form as they wouidn't need to give their email address if they didn't want to. And, hopefully, some chance of being able to filter out those inapproriate responses some people like to submit with these forms. Hello all, I am building a website for a church and I am having trouble getting the contact form working properly. Below is the form code I have. I am also new to ipage, so if anyone is familiar with any server setup, it would be greatly apreciated! <form method= "post" action="http://www.ipage.com/scripts/formemail.bml"> <input type="hidden" name="my_email" value="mailto:info@blanchardnaz.org"> Name<br> <input type="text" name="Name" size="25"><br> Email<br> <input type="text" name="Email" size="25"><br> Phone Number<br> <input type="text" name="Phone Number" size="25"><br> <br> <textarea rows="15" cols="50"></textarea> <br> <input type="submit" name="submit" value="Send" > <input type="reset" name="reset" value="Reset" > <input type="hidden" name="thankyou_url" value="http://www.blanchardnaz.org/index.html"> </form> Hi doesn anyone know where to find any javascript code to send an email form through a website. I've found code that lets you make a form that sends through your email client (i.e outlook), but I want it to all be done through the website. thanks Hey, I'm looking for a way to get a form to send an email to one or more recipients when someone hits the Submit button. I've seen the mailto angle, but I'm looking for the form to do the work itself, and don't want the mail app launched on the user's machine. Is this something I'd have to play with servlets and the like for, or is there some way to do it with javascript, html, whatever? Trying to create an order form for a web page that will send a mail to an order inbox. Have 2 problems: - The email appears and the user has to click "send". I do not want that. I want it to be sendt automatically, and the user should only get an output of "Order sent" How can I do this? - Also, the email is very cryptic. Is there any way I can edit the message body to be more easely readable? Appreciate any suggestions. Is there a way to have an email form that includes a field where you would enter an email address and this would be used in the "to" field of the email. Ok i am trying to make a page with a form to fill out and when they hit submit it gets send right to my email...but right now when i hit send my outlook comes up to send the email and i know not alot of people have outlook set up...how do i go about doing this??? what do i change in this? <!--Sign Up--> <center> <hr> <h4 class="bold">Sign Up! Become A Member</h4> <p class="height">Please fill all this out and submit it!</p> <form method="post" action="mailto:Email@Email.com" enctype="text/plain"> <fieldset> <legend>Your Information</legend><br> i am creating a website in Html script in notepad and have set up a form and would now like it to get the results of the form and send these to my hotmail acount with out gettin the user to have togo through outlook to do this. Is this possible? i have been getting so stressed over this Thanks Sir Minstral |