Announcement

Collapse
No announcement yet.

Setting up a form

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting up a form

    I am quite new to web-design, so need a bit of help. My hosting company can't provide the help I need, so having to look elsewhere.

    I want to create a form which goes on my contact.html page at the bottom but when I click 'send' it opens up an outlook new window.

    Can someone provide me the code that I need to put in the source (im using dreamweaver) and it needs to contain the following:

    Name:
    Email:
    Comments:
    If your ordering prints, please select a size below
    Image Name:
    20x20 (needs to be radio button)
    30x30 (needs to be radio button)
    40x40 (needs to be radio button)
    50x50 (needs to be radio button)
    60x60 (needs to be radio button)
    N/A (needs to be radio button)
    SUBMIT

    when clicking submit I need it to just be sent to an email address. the 20x20 etc need to be radio buttons so I can get an email with the size they want

    Is this possible? I have no idea what I need to do so any help would be great

  • #2
    resources

    Check out the one I use, which is free until a "certain" point.

    www.jotform.com

    Comment


    • #3
      If you'd rather do it yourself without a third party, then there's something like this:

      http://www.freecontactform.com/html_form.php

      Shows you how you can add a php function to your form, just by following their instructions, copying the code and editing the parameters you want.
      Last edited by blueresent; 07-05-2013, 07:18 AM.

      Comment


      • #4
        Try something like this perhaps?
        Code:
        <form action=“mailto:me@my_address.com“ method=“post“ enctype=“text/plain">
        <input type="radio" name="printSize">
        <input type="radio" name="printSize">
        <input type="radio" name="printSize">
        </form>
        It should have the desired effect however I stress this following fact. IT IS NOT A W3C standard. This kind of processing should be kept in server side programming.
        Last edited by sbeynon; 07-14-2013, 10:35 PM.
        Who needs a Signature?

        Comment


        • #5
          @sbeynon I don't think your solution is likely to work. I can see where you are coming from, but the form information will not be sent to the e-mail. Instead, when the user clicks Submit, a blank e-mail will open in the user's e-mail program, addressed to me@my_address.com.

          Here is my solution:

          Your form looks like this:
          HTML Code:
          <form method="post" action="form-complete.php"> <!-- make sure the action attribute points to your second page, whatever you decide to call it -->
          Name: <input type="text" name="cust-name"><br>
          E-mail: <input type="text" name="email"><br>
          Comments: <textarea name="comments"></textarea><br>
          If you are ordering prints, please select a size:<br>
          <input type="radio" name="size" value="20x20">20x20<br>
          <input type="radio" name="size" value="30x30">30x30<br>
          <input type="radio" name="size" value="40x40">40x40<br>
          <input type="radio" name="size" value="50x50">50x50<br>
          <input type="radio" name="size" value="60x60">60x60<br>
          <input type="radio" name="size" value="N/A">N/A<br>
          <input type="submit" value="Submit">
          </form>
          You can use CSS to style it however you want.

          On a separate page (form-complete.php or whatever you want to call it), place this script into the body along with a message saying "E-mail sent" or something like that.
          PHP Code:
          <?php

          $to
          ="your email address goes here";
          $subject="New order from PHP form";
          $message="Name: " $_POST['cust-name'] . "\n"
            
          "E-mail: " $_POST['email'] . "\n"
            
          "Comments: " $_POST['comments'] . "\n"
            
          "Size Requested: " $_POST['size'];
          mail($to$subject$message);
          ?>
          Note that this script will not check to see if the user has actually entered something in the form.
          Last edited by jansennerd10; 07-15-2013, 12:43 PM.

          Comment

          Working...
          X