Follow us on twitter

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorJAD716
    • CommentTimeNov 18th 2009
     
    Can anyone help me with this assignment?

    I need to validate my form which includes these fields.

    first name
    last name
    address
    city
    state (dropdown)
    zip
    phone
    email

    I need to use javascript to show the fields that need to be entered. Can anyone help me with this?

    Thanks in Advance!
    • CommentAuthorarshdeep79
    • CommentTimeMar 8th 2010 edited
     

    You can always use Javascript to detect if the fields are blank and will prompt an alert box that a missing field needs to be filled in. 

    Example: 

    if(document.getElementById('ID here') == ""){ 
       alert("This missing field - ~field name~ needs to be filled"); 

    else { 
       // some statement if you want 
    }

Add your comments