Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Jun 2005
    Location
    Nottingham
    Posts
    5,277
    Tokens
    75

    Latest Awards:

    Default HTML Form question

    How do you make a question in a form un-optional?
    VR|46

  2. #2
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    I dont get what your asking but

    http://habboxforum.com/showthread.php?t=26889

    A tutorial writen by Mentor

  3. #3
    Join Date
    Jun 2005
    Location
    Nottingham
    Posts
    5,277
    Tokens
    75

    Latest Awards:

    Default

    I mean you have to fill it in before you can send the form.
    VR|46

  4. #4
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    just check the field has been filled in..

  5. #5
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php
    if($pet == '') die('You did not fill in one of the required fields.');
    ?>
    Edit: Put that just after you get the vars from the user.
    Last edited by nets; 08-01-2006 at 04:45 PM.
    kinda quit.

  6. #6
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    or
    PHP Code:
    if(!$pet) {
    echo 
    "You did not fill in one of the required fields!";
    exit();

    the ! just check that the string $pet contains data..

  7. #7
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    u could proboly do it activly with js, by adding the onclick hander to the submit button, and checking values are entered in the form feiled, retruning faluce if not and poping up whats missing "/

  8. #8
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    I do that with php anyway since I usually include the html form in with the php document and use a javascript alert to warn them what needs filing in

  9. #9
    Join Date
    Jun 2005
    Location
    Nottingham
    Posts
    5,277
    Tokens
    75

    Latest Awards:

    Default

    My host dont allow php so whats the jv one?
    VR|46

  10. #10
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by DJ-Simpson
    My host dont allow php so whats the jv one?
    If you dont have php how are you doing form?

Page 1 of 2 12 LastLast

Posting Permissions

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