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
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    ...somewhere out there in the ether...
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Validating radio buttons?

    I hope this isn't a stupid question, but I have a form with a half dozen questions, each of which has 7 radio buttons for answers.

    How can I flag a user who has forgotten to answer one of the questions?

    I also have some text fields, but these will sometimes be legitimately left blank - don't know if that complicates things.

    Thanks in advance for any help you can supply!

  • #2
    Registered User
    Join Date
    Jun 2002
    Location
    Arizona
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    uhhh.. could use an example. i bet it is possible but i'm not getting an image of what you want

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Not a stupid question; however, this question has been asked (and answered) several hundred times. See that 'search' link above?

    All round form validator

    Here's a modification to make certain (text) fields required:

    function checkform(f) {
    ........
    case 'text' :
    case 'textarea' :
    if (el.required && !el.value) {

    ...and (HTML):

    <form ........
    onsubmit="extra.required=true;
    sample2.required=true;
    return checkform(this)">

    hope that helps, adios


  •  

    Posting Permissions

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