1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

HTML stuff (Forms)

Discussion in 'Web Design & Development' started by Hoovooloo, Jul 10, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. Hoovooloo

    Hoovooloo Thread Starter

    Joined:
    Aug 10, 2005
    Messages:
    100
    I'm setting up a form to add to my site, but I'm having some difficulty with it.

    The first thing is alignment. I having the text first, and so the radio buttons don't align (I can use   of course, but they don't align exactly using this method).

    They look something like this:

    option 1 ()
    option two ()
    option three ()


    The second thing is the submission of the form. How can I test it works? When I click on the submit button I first of all get the confirmation popup, which is fine of course, but then my computer starts up an Internet Connection Wizard. I don't want to do that cos I'm already connected. I tried just cancelling that, but nothing appears in my email inbox. Surely not everyone's computer will try to setup a new connection??


    Any help would be great! Thanks.
     
  2. thecoalman

    thecoalman

    Joined:
    Mar 6, 2006
    Messages:
    2,491
    Put them in a table or better yet use CSS.

    Table:

    <table border="1" width="100%">
    <tr><!-- Row 1 -->
    <td>Your text</td><!-- Col 1 -->
    <td><input type="radio" name="" value=""></td><!-- Col 2 -->
    </tr>
    </table>

    As far as the submit button... what are you submitting it too? A email address? If so don't do that, submit it to either a php file for prcocessing forms or formail. Most servers have formail installed, it's just a matter of pointing the form to formail and it processes and e-mails you the form... user won't gwt any pop-ups warning them it's being submitted via e-mail.
     
  3. Hoovooloo

    Hoovooloo Thread Starter

    Joined:
    Aug 10, 2005
    Messages:
    100
    thanks - i was thinking tables might be the way to go, but wasn't sure quite how to go about it.

    as for the rest, i'm afraid the only submit method i know is to submit to email. is the best way to ask for support from the hosts of the website itself?
     
  4. Sequal7

    Sequal7

    Joined:
    Apr 14, 2001
    Messages:
    2,382
    You could ask them, but chances are they arleady have a FAQ area that addresses your question. Who is your hosting provider, maybe we can find that info for you faster?
     
  5. Hoovooloo

    Hoovooloo Thread Starter

    Joined:
    Aug 10, 2005
    Messages:
    100
    thanks - it's all hosted by 123-reg.co.uk
     
  6. Sequal7

    Sequal7

    Joined:
    Apr 14, 2001
    Messages:
    2,382
    Your host does have formmail installed (its location is /formail/formail.cgi )

    Note: you need to change [email protected] in the hidden field in the example below
    (<input type='hidden' name="recipient" value="[email protected]">) to your e-mail address.
    You need to create a done.htm page and upload it to your site (this is where the form will load saying thanks or something along those lines). Once you have created that page, edit path/to/done.htm to the actual location and name of the page in the hidden field
    (<input type='hidden' name="redirect" value="path/to/done.htm">)

    Heres a sample form that you can add to your contact page, edit the areas required, then test it to see if it sends you an email.
    Code:
    <form id="f1" name="EmailForm" method="post" action="/formmail/formmail.cgi">
    <input type='hidden' name="recipient" value="[email protected]">
    <input type='hidden' name="subject" value="Website Form Results">
    <input type='hidden' name="required" value="email,option1">
    <input type='hidden' name="env_report" value="REMOTE_HOST">
    <input type='hidden' name="print_blank_fields" value="1">
    <input type='hidden' name="redirect" value="path/to/done.html">
      <table width="406" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="106">Name:</td>
          <td width="300"><label for="textfield"></label>
          <input type="text" name="name" id="name" /></td>
        </tr>
        <tr>
          <td>Email address:</td>
          <td><label for="textfield"></label>
          <input type="text" name="email" id="email" /></td>
        </tr>
        <tr>
          <td>Reply required? </td>
          <td><p>
            <label>
              <input type="radio" name="option1" value="radio" />
              No</label>
            <br />
            <label>
              <input name="option1" type="radio" value="radio" />
              Yes</label>
            <br />
          </p></td>
        </tr>
        <tr>
          <td>Message:</td>
          <td><label for="textarea"></label>
          <textarea name="textarea" cols="45" rows="10" id="textarea"></textarea></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><label for="Submit"></label>
          <input type="submit" name="Submit" value="Submit" id="Submit" /> <label for="label"></label>
          <input type="reset" name="reset" value="Reset" id="label" /></td>
        </tr>
      </table>
    </form>
     
  7. Hoovooloo

    Hoovooloo Thread Starter

    Joined:
    Aug 10, 2005
    Messages:
    100
    thanks.

    wow that looks and sounds tricky, but i'll have another look at it when i'm more awake! :)
     
  8. Eriksrocks

    Eriksrocks

    Joined:
    Aug 7, 2005
    Messages:
    2,183
    thecoalman, just because I want to learn, how would you do that with CSS?
     
  9. thecoalman

    thecoalman

    Joined:
    Mar 6, 2006
    Messages:
    2,491
    Code:
    <html>
    <head>
    <style type="text/css">
    .container
    {
    width: 300px;
    }
    .subcontainer
    {
    clear: both;
    }
    .leftcontent
    {
    float: left;
    text-align: right;
    width:50%;
    }
    .rightcontent
    {
    float: right;
    text-align: left;
    width:50%;
    }
    </style>
    </head>
    <body>
    <div class="container">
    <div class="subcontainer">
    <div class="leftcontent">Text</div>
    <div class="rightcontent"><input type="radio" name="" value=""></div>
    </div>
    <div class="subcontainer">
    <div class="leftcontent">Text</div>
    <div class="rightcontent"><input type="radio" name="" value=""></div>
    </div>
    </div>
    </body>
    </html>
    
    
    
    Do a search for css box model.
     
  10. Eriksrocks

    Eriksrocks

    Joined:
    Aug 7, 2005
    Messages:
    2,183
    Ah.. That makes sense. (y)
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/481992

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice