Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Html form help

  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Html form help

    I have decided to create an aup for a network setup and i have created a small html page i have little experience with forms and would like some assistance if possible.

    here is the code

    <html>
    <head>

    <title>Untitled Document</title>
    </head>

    <body>
    <p>policy here!!!</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>If you agree to these terns and conditions check the box and click submit.</p>
    <form name="form1" method="post" action="http://www.yahoo.co.uk">
    <p>
    <input type="checkbox" name="checkbox" value="checkbox">
    I agree to the terms and conditions</p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <p>&nbsp;</p>
    </body>
    </html>

    Basically I want to link the checkbox and the submit button together so that they cannot continue without selecting the box and then it forwards them onto a site for instance www.yahoo.co.uk. If at all possible I would like a prompt if they do not check the box basically stopping them from going anywhere but the page until the accept the policy which i will put it once i get the form working correctly. Im new it may look stupid but i dont have much html experience so any help or suggestions would be greatly appreciated.

    Thanks

    Bud

    not wanting too much maybe i could also add a field where the username must be put in and gets sent in file to an email address or a log file would be handy if this is possible!!

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Hi Bud, welcome to the forums...

    Well, to do what you are asking (not send a form if a field isn't filled in) is a bit out of the bounds of html and more into Javascript or a server-side language. I'd pick which one you have more experience with (or, in my case, are least afraid of ) and pm a moderator to move this message into the appropriate forum (pleeease don't crosspost).

    For something like this it'd honestly be easier to ask Google, then you could get something to copy and paste, unless you'd like to learn more.

    If you have any questions about the html of your forms in particular, though, I'd be glad to help

  • #3
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Yikes....

    First, you may want to brush up on your HTML forms and how to use them...

    Next, you may want to learn the fundamentals of a server-side language like PHP, that will allow you to validate form fields and add usernames to a log file, or email usernames to yourself...

    The code you have attempted to forge there is little more than the tip of the iceburg, as far as what you want to accomplish....

    Find yourself a good tutorial on HTML forms and PHP programming...do a Google search, there are plenty...

    Once you get going with the PHP programming, do a search on "form validation" to fix your form/checkbox issue....

    There are "filesystem functions" in PHP that will allow you to add usernames to a text (or log) file....do a Google search on "filesystem functions"......

    The PHP "mail function" will allow you to e-mail HTML form fields to yourself...

    Good luck!
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪


  •  

    Posting Permissions

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