+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 35
Web Development Thread, Web Based Toner request form in Coding and Web Development; Hi Guys, im trying to create a web based toner request form, i have the form created and am using ...
  1. #1
    kevbaz's Avatar
    Join Date
    Mar 2008
    Location
    Plymouth
    Posts
    855
    Thank Post
    129
    Thanked 69 Times in 47 Posts
    Rep Power
    44

    Web Based Toner request form

    Hi Guys, im trying to create a web based toner request form, i have the form created and am using mailto to have the form submitted by email, however upon clicking the submit button its only creating a blank email?

    how do i go about getting it to include the contents of the form?

    thanks

  2. #2

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Just a mo while I fetch the crystal ball...

  3. #3

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,404
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    169
    Are you setting the form to GET or POST? I think only POST will do what you want.

    A better way to handle this would be to send the form data to a script that build the email and sends it through sendmail. That way you get more control of the data and can format it properly.

  4. Thanks to CESIL from:

    kevbaz (7th December 2010)

  5. #4

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327
    Are you doing everything that this page tells you to?

    Mailto Forms - HTML Forms Tutorial - Using Mailto Forms

  6. Thanks to webman from:

    kevbaz (7th December 2010)

  7. #5
    kevbaz's Avatar
    Join Date
    Mar 2008
    Location
    Plymouth
    Posts
    855
    Thank Post
    129
    Thanked 69 Times in 47 Posts
    Rep Power
    44
    Quote Originally Posted by webman View Post
    Are you doing everything that this page tells you to?

    Mailto Forms - HTML Forms Tutorial - Using Mailto Forms
    Just looked that that and im setup the same, ive copied the example and tested it and it does exactly the same??? just opens a blank email?

  8. #6

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Perhaps I didn't make it clear enough: show the code.

  9. #7

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,404
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    169
    What browser?

    Chrome only seems to like POST

  10. #8
    kevbaz's Avatar
    Join Date
    Mar 2008
    Location
    Plymouth
    Posts
    855
    Thank Post
    129
    Thanked 69 Times in 47 Posts
    Rep Power
    44
    Win7 IE8 Office2010

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Marine Academy Toner Request</title>
    <link rel="stylesheet" type="text/css" href="view.css" media="all">
    <script type="text/javascript" src="view.js"></script>
    <script type="text/javascript" src="calendar.js"></script>
    <style type="text/css">
    <!--
    #main_body #form_container #form_64967 .form_description h2 {
    font-family: Century Gothic;
    }
    #main_body #form_container #form_64967 ul #li_1 .description {
    font-family: Century Gothic;
    }
    #main_body #form_container #form_64967 ul #li_2 .description {
    font-family: Century Gothic;
    }
    #main_body #form_container #form_64967 ul #li_3 .description {
    font-family: Century Gothic;
    }
    #main_body #form_container #form_64967 ul #li_5 .description {
    font-family: Century Gothic;
    }
    #main_body #form_container #form_64967 ul #li_6 .description {
    font-family: Century Gothic;
    }
    #main_body #form_container #form_64967 ul #li_4 {
    font-family: Century Gothic;
    }
    -->
    </style>
    </head>
    <body id="main_body" >

    <img id="top" src="top.png" alt="">
    <div id="form_container">

    <h1><a>Marine Academy Toner Request</a></h1>
    <form id="form_64967" class="appnitro" method="GET" action="mailto:somone@marineacademy.org.uk" enctype="text/plain">

    <div class="form_description">
    <h2>Marine Academy Toner Request <img src="http://www.marineacademy.org.uk/sites/default/files/simply_modern_logo.png" alt="logo" width="86" height="75" align="middle" /></h2>
    <p></p>
    </div>
    <ul >

    <li id="li_1" >
    <label class="description" for="element_1">Name </label>
    <span>
    <input id="element_1_1" name= "element_1_1" class="element text" maxlength="255" size="8" value=""/>
    <label>First</label>
    </span>
    <span>
    <input id="element_1_2" name= "element_1_2" class="element text" maxlength="255" size="14" value=""/>
    <label>Last</label>
    </span>
    </li> <li id="li_2" >
    <label class="description" for="element_2">Date </label>
    <span>
    <input id="element_2_1" name="element_2_1" class="element text" size="2" maxlength="2" value="" type="text"> /
    <label for="element_2_1">MM</label>
    </span>
    <span>
    <input id="element_2_2" name="element_2_2" class="element text" size="2" maxlength="2" value="" type="text"> /
    <label for="element_2_2">DD</label>
    </span>
    <span>
    <input id="element_2_3" name="element_2_3" class="element text" size="4" maxlength="4" value="" type="text">
    <label for="element_2_3">YYYY</label>
    </span>

    <span id="calendar_2">
    <img id="cal_img_2" class="datepicker" src="calendar.gif" alt="Pick a date.">
    </span>
    <script type="text/javascript">
    Calendar.setup({
    inputField : "element_2_3",
    baseField : "element_2",
    displayArea : "calendar_2",
    button : "cal_img_2",
    ifFormat : "%B %e, %Y",
    onSelect : selectDate
    });
    </script>

    </li> <li id="li_3" >
    <label class="description" for="element_3">Toner </label>
    <div>
    <select class="element select medium" id="element_3" name="element_3">
    <option value="" selected="selected"></option>
    <option value="1" >HP2600 Black £55</option>
    <option value="2" >HP2600 Cyan £58</option>
    <option value="3" >HP2600 Yellow £58</option>
    <option value="4" >HP2600 Magenta £58</option>

    </select>
    </div><p class="guidelines" id="guide_3"><small>Please select the toner you require</small></p>
    </li> <li id="li_5" >
    <label class="description" for="element_5">Location </label>
    <div>
    <input id="element_5" name="element_5" class="element text medium" type="text" maxlength="255" value=""/>
    </div>
    </li> <li id="li_6" >
    <label class="description" for="element_6">Budget </label>
    <div>
    <input id="element_6" name="element_6" class="element text medium" type="text" maxlength="255" value=""/>
    </div>
    </li> <li id="li_4" >
    <label class="description" for="element_4">Approved by budget holder? </label>
    <span>
    <input id="element_4_1" name="element_4_1" class="element checkbox" type="checkbox" value="1" />
    <label class="choice" for="element_4_1">No</label>
    <input id="element_4_2" name="element_4_2" class="element checkbox" type="checkbox" value="1" />
    <label class="choice" for="element_4_2">Yes</label>

    </span>
    </li>

    <li class="buttons">
    <input type="hidden" name="form_id" value="64967" />

    <input id="saveForm" class="button_text" type="submit" name="Submit" value="Submit" />
    </li>
    </ul>
    </form>
    <div id="footer"></div>
    </div>
    <img id="bottom" src="bottom.png" alt="">
    </body>
    </html>

  11. #9

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,157
    Thank Post
    522
    Thanked 2,552 Times in 1,981 Posts
    Blog Entries
    24
    Rep Power
    877
    Mailto makes use of your email client, and as such is generally a bad way of doing email notifications. The more elegant solution is to make use of a server side script which creates the email and sends it.

    Due to the fact the mail client is the one handling the creation of the email, the issue you're having could well be with that rather than your form.

    Also, each browser is likely to handle the form differently. For example, Chrome doesn't like GET for mailto forms, and IE8 doesn't particularly like POST for mailto forms, so you'll end up with mixed results!
    Last edited by localzuk; 7th December 2010 at 10:12 AM.

  12. Thanks to localzuk from:

    kevbaz (7th December 2010)

  13. #10

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    A load of your inputs have a blank space when declaring their name. This results in them not being defined.
    Last edited by powdarrmonkey; 7th December 2010 at 10:15 AM.

  14. #11

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,157
    Thank Post
    522
    Thanked 2,552 Times in 1,981 Posts
    Blog Entries
    24
    Rep Power
    877
    Quote Originally Posted by powdarrmonkey View Post
    A load of your inputs have a blank space when declaring their name. This results in them not being defined.
    I can't see any with spaces. I can see many with underscores...

  15. #12

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,404
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    169
    There is a space between the '=' and the first "

  16. #13

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by localzuk View Post
    I can't see any with spaces. I can see many with underscores...
    element_1_1
    element_1_2

  17. #14

    CESIL's Avatar
    Join Date
    Nov 2006
    Location
    Hampshire
    Posts
    1,404
    Thank Post
    109
    Thanked 267 Times in 198 Posts
    Rep Power
    169
    Quote Originally Posted by localzuk View Post
    The more elegant solution is to make use of a server side script which creates the email and sends it.
    Is there an echo in here

  18. #15

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Anyway, the problem is easy (now that you don't expect psychic assistance): you don't have an input named "body", which should be type text and becomes the body of the email. All your fancy inputs are wasted.

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 8th August 2011, 05:15 PM
  2. Online Cover Request Form
    By philjones2000 in forum How do you do....it?
    Replies: 0
    Last Post: 30th September 2010, 03:15 PM
  3. MOSS 2007 Form based Authentication
    By wesleyw in forum Windows
    Replies: 0
    Last Post: 27th November 2008, 12:11 PM
  4. Web-based contact form being abused
    By HodgeHi in forum Web Development
    Replies: 17
    Last Post: 5th November 2007, 11:29 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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