rotipom Posted February 16, 2010 Report Share Posted February 16, 2010 Hi there folks! I made this web form using Microsoft Word 2003 and its web tools, but cannot for the live of me figure out how to make the submit button work. http://www. treespacestudio.com/custom_invitations. htm I have it linked to my email but when I tested it all I received was a blank email. What could I be doing wrong? I surfed and surfed the net for something but all information are for creating forms from scratch. I already have a form! Hope someone can help me, I am about to toss my laptop on the floor... Thanks in advance! Amy Quote Link to comment Share on other sites More sharing options...
krillz Posted February 16, 2010 Report Share Posted February 16, 2010 (edited) if you want to preset the body data in the email you need to alter the mailto attributes, otherwise it will remain empty: Send me an email Now I checked your html, and I can see that you have more than 1 form in your source code, I would think you need to wrap all those into one form, otherwise when hiting the submit button all the different form elements won't be sent. Not that it matters in your case as you aren't sending them anywhere anyways. Check this example: action="mailto:yourname@yoursite.com" enctype="text/plain"> name=your_comments> value="Submit Your Comments"> However you have a lot of inputs, that you preferably would wan't formatted into a finnished string that you then attach to the mail body. otherwise you will only get the inputs and not the surounding text. But yeah anyway check the form to mail example I gave you, and recheck your code as it is not functional, I would rewrite and make it a lot cleaner as right now the sourcecode looks like a big mess, as M$ tends to add a lot of unneeded junk. Edited February 16, 2010 by krillz Quote Link to comment Share on other sites More sharing options...
Andrea Posted February 17, 2010 Report Share Posted February 17, 2010 Microsoft Word is about the WORST software you can possibly use to create a website- it is not meant for that, and the 'web tools' really are anything but. Your website has over EIGHT-HUNDRED validation errors. Quote Link to comment Share on other sites More sharing options...
rotipom Posted February 18, 2010 Author Report Share Posted February 18, 2010 (edited) Microsoft Word is about the WORST software you can possibly use to create a website- it is not meant for that, and the 'web tools' really are anything but. Your website has over EIGHT-HUNDRED validation errors. Krillz, thanks for the suggestion, I tried to clean up the form part a bit, but still not clear what I should do about inserting the body text into the mailto link. Do I insert the mailto link at the top of the document and reference the entire body text that follows, or do I need to copy and paste the entire body text again to include in the link at the end of the document? Sorry, clearly a beginner. Andrea, I initially used word just to prepare a pdf form for a client and then found out you can't really use that because there is NO way they can save the form after it being filled out because you need some expensive plugin. Then I read that you can actually publish to web word forms using webtools and tried that. At this point, I need to send the web form link out to clients pretty urgently and I know its terribly messy and completely the wrong way to go about it and all, but is there ANY way I can just get it to be submittable? I'll clean it up later I promise!! Thanks so much in advance, Amy Edited February 18, 2010 by rotipom Quote Link to comment Share on other sites More sharing options...
rotipom Posted February 18, 2010 Author Report Share Posted February 18, 2010 Still trying to figure this out...can anyone help me? Thanks!! Quote Link to comment Share on other sites More sharing options...
krillz Posted February 18, 2010 Report Share Posted February 18, 2010 Still trying to figure this out...can anyone help me? Thanks!! do you have access to php or any other server side language? If so format it using php and send it through mail(). if not you will need to use javascript to format it into a string and then attach it to the body attribute in the mailto: function. Quote Link to comment Share on other sites More sharing options...
jbwebdesign Posted February 18, 2010 Report Share Posted February 18, 2010 lang=EN-US link=blue vlink=purple style='tab-interval:.5in'> src="custom_invitations_files/image006.jpg" v:shapes="_x0000_i2068"> style='font-family:Verdana;color:#009999'>A Wedding Invitation Investigation! style='font-size:10.0pt;font-family:Verdana'>Fill in the form as detailed aspossible. It’s worth it I promise. Every little question is designed sothat I can find out as much as possible about your big event, what you REALLYwant in your invitations and your (yes, the two of you, don’t surprisehim ) style preferences! style='font-size:10.0pt;font-family:Verdana;color:#009999'>Our Special DayInformation: style='font-size:10.0pt;font-family:Verdana'>Our wedding will be held in /and style='font-size:10.0pt;font-family:Verdana'>It will be held on this date style='font-size:10.0pt;font-family:Verdana'>The wedding will have # of parts. (ceremony, reception, tea-ceremony, etc). They are style='font-size:10.0pt;font-family:Verdana'>Our wedding would be ( class=GramE>indoor/outdoor?) style='font-size:10.0pt;font-family:Verdana'>We want our wedding to be Traditional Dinner Banquet Garden Cocktails Fancy Dress Casual Country City/Urban Vintage Beach Destination Themed/Others style='font-size:10.0pt;font-family:Verdana'>We are inviting # of guests, we would like to send invitations class=GramE>tostyle='font-size:10.0pt;font-family:Verdana'> #of guests style='font-size:10.0pt;font-family:Verdana'>We want our invitations to be: Traditional Formal and Classy Casual Edgy/Cool Unique and Alternative Natural and Rustic style='font-size:10.0pt;font-family:Verdana'>We want to send them out by this date . style='font-size:10.0pt;font-family:Verdana'>We are interested in save-the-dates or RSVPs. Yes No style='font-size:10.0pt;font-family:Verdana'>What information do you absolutely must have on your invitation? style='font-size:10.0pt;font-family:Verdana'> style='font-size:10.0pt;font-family:Verdana'>What standard information do you want on your information? style='font-size:10.0pt;font-family:Verdana'> style='font-size:10.0pt;font-family:Verdana;color:#009999'>The Story of Us: style='text-decoration:none'> style='font-size:10.0pt;font-family:Verdana'>My favorite colors are style='mso-spacerun:yes'> and style='mso-spacerun:yes'> while he likes style='mso-spacerun:yes'> and . style='font-size:10.0pt;font-family:Verdana'>This is the story we TELL others about how we met: style='font-size:10.0pt;font-family:Verdana'>I grew up in , he grew up in style='font-size:10.0pt;font-family:Verdana'>The awesomest part of our relationship that we want reflected in our invitations is that style='font-size:10.0pt;font-family:Verdana;color:#009999'>Style and Fun style='font-size:10.0pt;font-family:Verdana'>We like these types of music (pick 3) Blues Rock and Roll (70s) Rock and Roll (60s) Big Band Heavy Metal 80’s Music Oldies/Folk/Country Musicals/Broadway Classical Alternative World Music Others style='font-size:10.0pt;font-family:Verdana'>My favorite city in the whole wide world is style='mso-spacerun:yes'> his favorite city in the whole wide world is . style='font-size:10.0pt;font-family:Verdana'> style='mso-spacerun:yes'> Our favorite activity together class=GramE>is . style='font-size:10.0pt;font-family:Verdana'>Finish this sentence (check all that applies) : I am a ______kind of girl: Cotton Linen Lace Silk Chiffon Burlap Muslin Hi-tech/synthetic fabrics Wool knits Cashmere Velvet Brocade style='font-size:10.0pt;font-family:Verdana'>Finish this sentence (check all that applies) : I/we prefer ___________ Japanese washipapers Handmade paper Vintage aged papers Tissue-thin paper Flecked recycled paper Textured paper Refined thick cotton rag paper Any tree-free papers Standard cardstock style='font-size:10.0pt;font-family:Verdana'>Finish this sentence (pick 3): We are definitely into _______ : Polished wood Vintage, antique or reclaimed wood Wood Veneer Brushed metal Hi-shine metal Gold Silver Copper Plastic Anything in the natural world only! style='font-size:10.0pt;font-family:Verdana'>We MOST like these movies (pick 3): Classic Film Noir Silent Movies Musicals/Broadway Fantasy/Sci-Fi Period Dramas 80’s Teen Movies Zombie Movies Horror Flicks Romantic Comedies Edgy Psychological Thrillers Martial Arts Films Foreign Art House Cult/Alternative Movies Sweeping Epics Others style='font-size:10.0pt;font-family:Verdana'>Which invitation type from the link below do you most like? (important: make sure to copy and paste link in new window) www.etsy.com/shop/treespacestudio enctype="application/x-www-form-urlencoded">style='font-size:10.0pt;font-family:Verdana'> style='font-size:10.0pt;font-family:Verdana'> style='font-size:10.0pt;font-family:Verdana'>src="custom_invitations_files/image009.jpg" v:shapes="_x0000_i2071"> The class=SpellE>TreeSpace Studio Personalized{Functional} Artwork and Design Solutions For Your Creative,Business and Everyday Needs style='font-size:10.0pt;font-family:Verdana'>1-818-574-6942 style='font-size:10.0pt;font-family:Verdana'>href="mailto:info@treespacestudio.com">info@treespacestudio.com style='font-size:10.0pt;font-family:Verdana'>href="http://www.treespacestudio.com/">http://www.treespacestudio.com style='font-size:10.0pt;font-family:Verdana'>href="http://www.treespacestudio.com/blog">http://www.treespacestudio.com/blog style='font-size:10.0pt;font-family:Verdana'> Quote Link to comment Share on other sites More sharing options...
krillz Posted February 18, 2010 Report Share Posted February 18, 2010 //here is where you will set the variables you want to post from the form $first_name = $_POST['first_name']; //THIS IS THE NAME OF THE INPUT TYPE INSIDE THE FORM $last_name = $_POST['last_name']; //THIS IS THE NAME OF ANOTHER INPUT TYPE INSIDE THE FORM //here you will email the information to yourself mail("youremail@youremail.com","Subject of email address","message you want to write to yourself\n\r" . $_POST['first_name']; . "\n\r" . $_POST['last_name'] . "\n\r"); ?> Your code is not protecting against header injections, with that code someone could hijack your form and use it to send out spam. Always make sure no headers are being sent via the inputs. Quote Link to comment Share on other sites More sharing options...
jbwebdesign Posted February 18, 2010 Report Share Posted February 18, 2010 so krillz how would you hijack the form and send out spam?....this is good, i am not the best programmer but i always like to learn new things Quote Link to comment Share on other sites More sharing options...
krillz Posted February 18, 2010 Report Share Posted February 18, 2010 so krillz how would you hijack the form and send out spam?....this is good, i am not the best programmer but i always like to learn new things if you check how a mail is built up and function and by reviewing the structure of the mail() function in php you could come to the conclusion that by entering values like mail headers you could get the form to act like you wish, let say I inject a header with copies to all the emails in my spam list, ( not massive spam lists but still) I can get that form to send out spam using your adress as sender. This is a common mistake coders do in online mailforms and a lot of famous ones has at one point been known to have this lack of security and been abused. You should always check all input you are using the mail() function for headers like: TO: CC: CCO: Content-Type. And if these are found you should abort the script and notify that code injection is not allowed. Sorry but I've been working with web security for some good years now, and proof hacking applications are one of my tasks at work, kind of have a eye for these things. Quote Link to comment Share on other sites More sharing options...
jbwebdesign Posted February 18, 2010 Report Share Posted February 18, 2010 hey don't be sorry, i like to learn from my mistakes.....thanks for the info Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
× Pasted as rich text. Paste as plain text instead
Only 75 emoji are allowed.
× Your link has been automatically embedded. Display as a link instead
× Your previous content has been restored. Clear editor
× You cannot paste images directly. Upload or insert images from URL.