Dreamweaver forms - question about the fields

Discussion in 'HTML & Website Design' started by AdrianMoss, Apr 29, 2009.

  1. #1
    So I have a form on my website and everything works in terms of people filling out information, hitting submit, firing it off to the server, and then back to my email address.

    The problem I'm having is that when I get the email the fields are all jumbled around.

    For example, if my form is laid out in this fashion:

    Name
    Address
    Phone Number
    Email

    I might get it back in email in this order:

    Address
    Name
    Email
    Phone Number

    I imagine there is a way to correct this (this is where you come in!)
     
    AdrianMoss, Apr 29, 2009 IP
  2. AdrianMoss

    AdrianMoss Active Member

    Messages:
    159
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Anyone? Someone has to know the answer to this...
     
    AdrianMoss, Apr 30, 2009 IP
  3. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Where's your code? How can anyone help you without seeing what you've done?
     
    Masterful, Apr 30, 2009 IP
  4. gummyworms

    gummyworms Active Member

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #4
    show me your php code
     
    gummyworms, May 1, 2009 IP
  5. Ristaki

    Ristaki Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    <offtopic>@AdrianMoss, Don't waste your time with stupid software. You can learn the basics of web development(php,html,css,javascript) within a month, perhaps even less time, if you try harder :) It's very easy and sometimes it's even fun to code something :)
    </offtopic>

    Give us the code, we can't guess :)
     
    Ristaki, May 2, 2009 IP
  6. Rad_Dev

    Rad_Dev Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I assume you didn't write your own script or you'd probably know how to format the form fields yourself. It's hard to help if we don't know the script you're using but... If your using Matt's formmail script to send the info there is a 'sort' variable to set the order of the form fields.
     
    Rad_Dev, May 3, 2009 IP
  7. AdrianMoss

    AdrianMoss Active Member

    Messages:
    159
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #7
    I appreciate the help, I'm just a little bit confused as to what you want to see. Im using Dreamweaver CS3 to build the site and I do "play" with the code a little bit, but I'm not at a point where I have the ability to build a site from scratch without Dreamweaver.

    I've got well over 1,000 lines of code, what specifically do I need to post for you to help me?
     
    AdrianMoss, May 3, 2009 IP
  8. Rad_Dev

    Rad_Dev Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    There is an action your form uses to post the data collected so it can be formatted and emailed to you. What is the script in your form's action attribute?
     
    Rad_Dev, May 4, 2009 IP
  9. AdrianMoss

    AdrianMoss Active Member

    Messages:
    159
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #9
    Hopefully this is what your referring to...

    <form action="http://www.xxxxxxxx.com/gdform.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
    <p>
    <input type="hidden" name="redirect" value="Thankyou.html">
    <input type="hidden" name="subect" value="A New Inquiry"></p>
     
    AdrianMoss, May 6, 2009 IP
  10. Aaron Sustar

    Aaron Sustar Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Dear Adrian, in this case we would need to see the PHP code inside the gdform.php file. If this file contains any security details such as database passwords (which it probably doesn't), make sure you remove them before showing us the actual code.
     
    Aaron Sustar, May 7, 2009 IP
  11. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Adrian, here's what you're missing:

    Dreambeaver writes (bad) HTML code. HTML code doesn't do anything with the forms, it's merely the structure of the forms. The actual labels (if you have any), inputs, and the submit button. Further, nothing else.

    The SCRIPT referred to in your action="blah" is what is taking those filled-in fields and doing stuff to them. Therefore, this is NOT an HTML problem. This is a PHP problem... that script does stuff with the inputs, and so it's the thing that's screwing up the order of the information. So, this should be posted in a PHP forum, and the PHP script itself should be posted, so PHP people can sift through it and find where the losing order is coming from. Or, it seems there are some PHP people right here, you could post that script here as well. But this is definitely not an HTML topic.
     
    Stomme poes, May 7, 2009 IP