Advanced Search

Results 1 to 2 of 2

Thread: Aligning Text Boxes & .att format

  1. #1
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Aligning Text Boxes & .att format

    I have written my own enquiry form using a tutorial, but am struggling to align the text boxes so the form looks neat and tidy. Could anyone show me how to do this? - I have pasted my code below.
    Also I am receiving the form in .att format. How can I receive it in .doc or text form within the email?
    Any help appreciated. Thanks, Regards, Laura.


    <FORM METHOD="POST" ACTION="mailto:laura.murray@blueyonder.co.uk">

    Full Name <INPUT TYPE="text" NAME="name" SIZE="30">
    <BR>
    Address <INPUT TYPE="text" NAME="Address" SIZE="30">
    <BR>
    Town/City <INPUT TYPE="text" NAME="Town City" SIZE="30">
    <BR>
    County <INPUT TYPE="text" NAME="County" SIZE="30">
    <BR>
    Post Code <INPUT TYPE="text" NAME="Post Code" SIZE="30">
    <BR>
    Telephone Number <INPUT TYPE="text" NAME="Telephone Number" SIZE="30">
    <BR>
    Email Address <INPUT TYPE="text" NAME="Email Address" SIZE="30">
    <BR>
    Number in Party <SELECT NAME="Number in Party" SIZE="1">
    <OPTION SELECTED>1
    <OPTION>2
    <OPTION>3
    <OPTION>4
    <OPTION>5
    <OPTION>6
    <OPTION>7
    <OPTION>8
    <OPTION>9
    <OPTION>10
    </SELECT>
    <BR>
    Arrival Date <SELECT NAME="Arrival Date" SIZE="1">
    <OPTION SELECTED>1
    <OPTION>2
    <OPTION>3
    <OPTION>4
    <OPTION>5
    <OPTION>6
    <OPTION>7
    <OPTION>8
    <OPTION>9
    <OPTION>10
    <OPTION>11
    <OPTION>12
    <OPTION>13
    <OPTION>14
    <OPTION>15
    <OPTION>16
    <OPTION>17
    <OPTION>18
    <OPTION>19
    <OPTION>20
    <OPTION>21
    <OPTION>22
    <OPTION>23
    <OPTION>24
    <OPTION>25
    <OPTION>26
    <OPTION>27
    <OPTION>28
    <OPTION>29
    <OPTION>30
    <OPTION>31
    </SELECT>
    Month <SELECT NAME="Month" SIZE="1">
    <OPTION SELECTED>January
    <OPTION>February
    <OPTION>March
    <OPTION>April
    <OPTION>May
    <OPTION>June
    <OPTION>July
    <OPTION>August
    <OPTION>September
    <OPTION>October
    <OPTION>November
    <OPTION>December
    </SELECT>
    Year <SELECT NAME="Year" SIZE="1">
    <OPTION SELECTED>2007
    <OPTION>2008
    </SELECT>
    <BR>
    Departure Date <SELECT NAME="Departure Date" SIZE="1">
    <OPTION SELECTED>1
    <OPTION>2
    <OPTION>3
    <OPTION>4
    <OPTION>5
    <OPTION>6
    <OPTION>7
    <OPTION>8
    <OPTION>9
    <OPTION>10
    <OPTION>11
    <OPTION>12
    <OPTION>13
    <OPTION>14
    <OPTION>15
    <OPTION>16
    <OPTION>17
    <OPTION>18
    <OPTION>19
    <OPTION>20
    <OPTION>21
    <OPTION>22
    <OPTION>23
    <OPTION>24
    <OPTION>25
    <OPTION>26
    <OPTION>27
    <OPTION>28
    <OPTION>29
    <OPTION>30
    <OPTION>31
    </SELECT>
    Month <SELECT NAME="Month" SIZE="1">
    <OPTION SELECTED>January
    <OPTION>February
    <OPTION>March
    <OPTION>April
    <OPTION>May
    <OPTION>June
    <OPTION>July
    <OPTION>August
    <OPTION>September
    <OPTION>October
    <OPTION>November
    <OPTION>December
    </SELECT>
    Year <SELECT NAME="Year" SIZE="1">
    <OPTION SELECTED>2007
    <OPTION>2008
    </SELECT>
    <BR>
    Comments <TEXTAREA NAME="Comments" ROWS=6 COLS=40>
    </TEXTAREA>
    <BR>
    <INPUT TYPE="submit">
    <INPUT TYPE="reset">
    </FORM>

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    There is no aligning whatsoever in that. You should look into CSS, or even just basic html aligning commands.

    <div align="center">....your form here...</div> would center everything, for example.

    With CSS, you can have a lot of control over the presentation, such as margins, spacing, alignment, size, width, height, etc etc.

    I really have no idea what ".att" is, except that I can guess it's an attachment. That is because you are using action="mailto:..."
    The action is where the form is sent.
    So... there are three options for the action--
    1. mailto:
    this is the least customizable, though the easiest, but really not worth it, considering all the problems it presents. You require, then, that the default mail client for the user can send the data and require that they do so. This is frequently not setup correctly on many computers. I know it isn't for me, because I use a web-based email, which doesn't integrate into the system like that. This method also, honestly, just makes your website/coding look silly.
    2. Use a free form-mailer. (google "form mailer".) This is a decent option, but there are a couple downsides--- a) you have to find a free one that works ok, which isn't too hard, but takes a bit of searching to find one that meets your needs, b) you will probably get ads in what is sent to you, c) it will be apparent that it isn't very professional as you are relying on a free service.
    Here, you would set the action of the form to the url the free form mailer provides, like action="freeform.com/mailer.php", and follow their directions to make it work, such as how they would like you to setup your email address.
    3. The "best", and most complex route is using your own code to create the desire effect. This presents the most options (and the most work). Using PHP (or other server-side programming/scripting languages), you can get the contents of the form then email them to yourself or others, or even add them to a database, text file on the server, post them into the next webpage, etc etc. This also, unlike the free form mailer, will allow you to do some processing (formatting/etc.) before the text is sent so you can organize what is sent with appropriate titles, etc.
    I'd suggest looking into PHP if this appeals to you.


    The free form mailer will send (generally) "<fieldname> value", or something like that. It will be text within the email. No way to control that, with a free form mailer.
    With PHP etc, though, you can certainly have that happen (as is the usual method), or do something else, such as send as a text attachment to the email.
    .doc is proprietary to microsoft and not accessible. You could theoretically figure out how it works then have PHP create a .doc file, but that would involve reverse engineering the .doc format, which is frowned upon, and, more than that, would just be a lot more work than is worth it. PHP is designed to work with html, so if you do need formatting, you could just use that.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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