title: jquery/javascript alert if all fields are not completed
body: <p>I have a form which I'd like to alert people if ALL of the fields aren't completed. I am currently using a jquery validation script for the required fields, but I need it to also let people know that not all of the fields are filled out before saving (they're not required fields, but just to let them know that the form isn't finished).</p>
  
  <p>The form fields are:</p>
  
  <p>type, status, rating, cterms, companyid, company, name, surname, address, suburb, city, state, country, pcode, phone, email and comments</p>
  
  <p>If someone could help me out with this, that'd be great, I dont mind if it's with jquery or javascript, just something that will alert that not all of the fields are completed and if they want to continue with the save or not.</p>
  
  <p>Cheers</p>
  
  <p>Leanne</p>
  
  <p>EDIT:</p>
  
  <p>Here's the form:</p>
  
  <pre><code>&lt;form action="/index.php?option=com_database&amp;view=add&amp;Itemid=3&amp;task=save" method="post" name="adminForm" id="adminForm"&gt;
    &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
      &lt;tr&gt;
        &lt;td width="50%" align="left" valign="top"&gt;&lt;table width="100%" border="0" cellspacing="2" cellpadding="3"&gt;
            &lt;tr&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Active:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
                  &lt;tr&gt;
                    &lt;td align="left" valign="middle"&gt;&lt;input type="radio" name="published" id="published0" value="0" checked="checked" /&gt;&lt;/td&gt;
                    &lt;td align="left" valign="middle"&gt;&amp;nbsp;&lt;/td&gt;
                    &lt;td align="left" valign="middle"&gt;&lt;label for="published0"&gt;No&lt;/label&gt;
                    &lt;/td&gt;
                    &lt;td align="left" valign="middle"&gt;&amp;nbsp;&lt;/td&gt;
                    &lt;td align="left" valign="middle"&gt;&lt;input type="radio" name="published" id="published1" value="1" /&gt;&lt;/td&gt;
                    &lt;td align="left" valign="middle"&gt;&amp;nbsp;&lt;/td&gt;
                    &lt;td align="left" valign="middle"&gt;&lt;label for="published1"&gt;Yes&lt;/label&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                &lt;/table&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Date:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="admintable"&gt;&lt;input class="text_area" type="text" name="date" id="date" size="30" value="22/09/2009" disabled="disabled" style="width: 200px;" /&gt;
              &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Type:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;select name="type" id="type" size="1" class="validate[required]" style="width: 205px;"&gt;
                  &lt;option value=""&gt;- Select Type -&lt;/option&gt;
                  &lt;option value="1"&gt;Customer&lt;/option&gt;
                  &lt;option value="2"&gt;Supplier&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class="admintable"&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Status:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;select name="status" id="status" size="1" class="validate[required]" style="width: 205px;"&gt;
                  &lt;option value=""&gt;- Select Status -&lt;/option&gt;
                  &lt;option value="1"&gt;Existing&lt;/option&gt;
                  &lt;option value="2"&gt;Potential&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Rating:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;select name="rating" id="rating" size="1" class="validate[required]" style="width: 205px;"&gt;
                  &lt;option value=""&gt;- Select Rating -&lt;/option&gt;
                  &lt;option value="1"&gt;Principal&lt;/option&gt;
                  &lt;option value="2"&gt;Secondary&lt;/option&gt;
                  &lt;option value="3"&gt;Minor&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class="admintable"&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Credit Terms:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;select name="cterms" id="cterms" size="1" class="validate[required]" style="width: 205px;"&gt;
                  &lt;option value=""&gt;- Select Credit Terms -&lt;/option&gt;
                  &lt;option value="1"&gt;COD&lt;/option&gt;
                  &lt;option value="2"&gt;30 Days&lt;/option&gt;
                  &lt;option value="3"&gt;60 Days&lt;/option&gt;
                  &lt;option value="4"&gt;90 Days&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Database:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;select name="companyid" id="companyid" size="1" class="validate[required]" style="width: 205px;"&gt;
                  &lt;option value=""&gt;- Select Database -&lt;/option&gt;
                  &lt;option value="2"&gt;Cody Opal&lt;/option&gt;
                  &lt;option value="1"&gt;National Opal Collection&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Company:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input class="validate[required] text_area" type="text" name="company" id="company" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Address:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input class="validate[required] text_area" type="text" name="address" id="address" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Address 2:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input class="text_area" type="text" name="address2" id="address2" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Suburb:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input class="validate[required] text_area" type="text" name="suburb" id="suburb" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;City:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input class="validate[required] text_area" type="text" name="city" id="city" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;State:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div id="entry_state1"&gt;
                  &lt;input class="validate[required] text_area" type="text" name="state" id="state" size="30" value="" style="width: 200px;" /&gt;
                &lt;/div&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Postcode:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input class="validate[required] text_area" type="text" name="pcode" id="pcode" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Country:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;select name="country" id="country" onChange="javascript: loadstate1();" class="selectstate validate[required]"&gt;
                  &lt;option value=""&gt;- Select Country -&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Primary Contact Name:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="validate[required] text_area" type="text" name="name" id="name" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Primary Contact Surname:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" type="text" name="surname" id="surname" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Primary Contact Position:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" type="text" name="position" id="position" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Primary Contact Email:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="validate[required,custom[email]] text_area" type="text" name="email" id="email" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Secondary Contact:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" type="text" name="contact" id="contact" size="30" value="" style="width: 200px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Phone - Business:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="validate[required] text_area" name="country_code[]" type="text" id="country_code" value="+" size="2" maxlength="5" style="width: 33px;" /&gt;
                &lt;input class="validate[required,custom[telephone]] text_area" type="text" name="phone_b" id="phone_b" size="22" value="" style="width: 160px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Phone - Direct:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" name="country_code[]" type="text" id="country_code" value="+" size="2" maxlength="5" style="width: 33px;" /&gt;
                &lt;input class="validate[optional,custom[telephone]] text_area" type="text" name="phone_d" id="phone_d" size="22" value="" style="width: 160px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Phone - Mobile:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" name="country_code[]" type="text" id="country_code" value="+" size="2" maxlength="5" style="width: 33px;" /&gt;
                &lt;input class="validate[optional,custom[telephone]] text_area" type="text" name="phone_m" id="phone_m" size="22" value="" style="width: 160px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Phone - Personal:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" name="country_code[]" type="text" id="country_code" value="+" size="2" maxlength="5" style="width: 33px;" /&gt;
                &lt;input class="validate[optional,custom[telephone]] text_area" type="text" name="phone_p" id="phone_p" size="22" value="" style="width: 160px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Fax:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;input class="text_area" name="country_code[]" type="text" id="country_code" value="+" size="2" maxlength="5" style="width: 33px;" /&gt;
                &lt;input class="validate[optional,custom[telephone]] text_area" type="text" name="phone_f" id="phone_f" size="22" value="" style="width: 160px;" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="top" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Customer Comments:&lt;/strong&gt;&lt;/td&gt;
              &lt;td align="left" valign="middle" nowrap="nowrap"&gt;&lt;textarea name="comments" id="comments" cols="30" rows="7"&gt;&lt;/textarea&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan="2" align="left" valign="top"&gt;&lt;table width="100%" border="0" cellspacing="2" cellpadding="3"&gt;
            &lt;tr&gt;
              &lt;td width="160" align="left" valign="top" nowrap="nowrap" class="key"&gt;&lt;strong&gt;Classifications: &lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div class="company_1"&gt;
                  &lt;table width="135" border="0" cellspacing="0" cellpadding="0" align="left" style="border: solid 1px #ff0000; margin-right: 10px; background-color: #ff0000; background-image: url(/templates/home/scripts/opacity.png);" class="classTables"&gt;
                    &lt;tr&gt;
                      &lt;td colspan="2" align="center" valign="middle" style="background-color: #ff0000; background-image: none; padding: 2px 2px 2px 2px;"&gt;&lt;strong&gt;OTHER&lt;/strong&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td align="center" valign="middle" width="20"&gt;&lt;input type="checkbox" name="classifications[70]" id="classifications[70]" value="70" class="checkbox" /&gt;&lt;/td&gt;
                      &lt;td align="left" valign="middle"&gt;&lt;label for="classifications[70]"&gt;VIP Client&lt;/label&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td align="center" valign="middle" width="20"&gt;&lt;input type="checkbox" name="classifications[71]" id="classifications[71]" value="71" class="checkbox" /&gt;&lt;/td&gt;
                      &lt;td align="left" valign="middle"&gt;&lt;label for="classifications[71]"&gt;Retailer&lt;/label&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td align="center" valign="middle" width="20"&gt;&lt;input type="checkbox" name="classifications[72]" id="classifications[72]" value="72" class="checkbox" /&gt;&lt;/td&gt;
                      &lt;td align="left" valign="middle"&gt;&lt;label for="classifications[72]"&gt;Media&lt;/label&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td align="center" valign="middle" width="20"&gt;&lt;input type="checkbox" name="classifications[73]" id="classifications[73]" value="73" class="checkbox" /&gt;&lt;/td&gt;
                      &lt;td align="left" valign="middle"&gt;&lt;label for="classifications[73]"&gt;Consultant&lt;/label&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td align="center" valign="middle" width="20"&gt;&lt;input type="checkbox" name="classifications[74]" id="classifications[74]" value="74" class="checkbox" /&gt;&lt;/td&gt;
                      &lt;td align="left" valign="middle"&gt;&lt;label for="classifications[74]"&gt;Contractor&lt;/label&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td align="center" valign="middle" width="20"&gt;&lt;input type="checkbox" name="classifications[75]" id="classifications[75]" value="75" class="checkbox" /&gt;&lt;/td&gt;
                      &lt;td align="left" valign="middle"&gt;&lt;label for="classifications[75]"&gt;Other&lt;/label&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/table&gt;
                &lt;/div&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;input type="submit" name="submit" value="Add New Client" /&gt;
  &lt;/form&gt;
  </code></pre>