53 users online (0 members and 53 guests)  


Page 2 of 2 First 1 2
  Results 16 to 18 of 18

Related

  1. HTML Form with required fields    Forum: HTML Forum
    Replies: 10
  2. Required Form Fields    Forum: Javascript Forum
    Replies: 1
  3. Replies: 1
  4. Replies: 3
  1. #16
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hmm.

    At the moment, the 'You must Fill Out ALL The Fields' works fine. Do we need to get more complicated?

    Try combining the above onSubmit with onChange(), you can check each form element as they leave it...

    Code:
    function check_me(obj, name) {
    if (obj.value=="") {
    alert("You musnt leave " + name + " blank!");
    this.focus();
       }
    }
    
    
    
    <input type="text" name="bwawr" onChange="check_me(this, 'first name')">
    I haven't actually checked/tested this, it sprobably full of bugs, but it is an idea for something to try
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  2. #17
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    You know me Dean, of course I'm going to use the PHP way but when presented with something I can't solve... I try so solve it

    the one way works, but I was just trying to see if I could do both. But, I'm sick of it now haha so I'm not worried about it anymore.

  3. #18
    teddyc0777's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2012
    Posts
    1

    Re: required fields in a form

    Hey guys, i have the same question. I am a complete noob to html and had someone else do my website that is no longer available to help.
    where and what do i need to do to make the four fields required in to submit messages?
    my coding looks like this


    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Your Name:
    </font>
    </td>
    <td valign="top" rowspan="10">
    <table>
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Message:
    </font>
    </td>
    </tr>
    <tr>
    <td>
    <textarea rows="10" cols="30" name="message"></textarea>
    </td>
    </tr>
    </table>
    </td>
    </tr>

    <tr>
    <td>
    <input type="text" size ="30" name="name">
    </td>
    </tr>
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Your E-Mail:
    </font>
    </td>
    </tr>
    <tr>
    <td>
    <input type="text" size ="30" name="email_address">
    </td>
    </tr>
    <tr>
    <td>
    <font face="calibri" color="#FFFFFF">
    Phone Number:
    </font>
    </td>
    </tr>
    <tr>
    <td>
    <input type="text" size ="30" name="subject">
    </td>
    </tr>
    <tr>
    <td colspan="10">
    <input type="submit" name="send_message" value="Send Message!">
    </form>
    </td>
    </tr>
    </table>
    </td>
    <td valign="top">
    <table>
    <tr>
    <td width="10">
    </td>
    <td>
    <table>
    <tr>
    <td valign="top">



Page 2 of 2 First 1 2