-1

I have a form here using the validation engine, I would like to have it so that if someone clicks on "no experience" a message comes up saying "you must have at least 1 year of experience" and they can't move on to submit the form if they have 1 year.

https://web.archive.org/web/20121129085036/http://www.barr-nunn.com/careers/form.php

How can I do that?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mixmastermichael
  • 143
  • 3
  • 14

2 Answers2

0

You can achieve this by using on change function,

Ex :

$("#Selectbox").change(function(){
   var selecVal = $(this).val();
    if( selecVal == 'No Experience') {
         $('#Selectbox').attr("class","validate[required]");
     } 

});

If you want pass custom message you do that also, refer this

http://posabsolute.github.io/jQuery-Validation-Engine/

BenMorel
  • 34,448
  • 50
  • 182
  • 322
somu.web
  • 379
  • 1
  • 5
  • 14
0

By Using Jquery Validation Engine:

       <select  id="experience" class="validate[required]">
                <option >No Experience</option>
                <option >Below 1 yr</option>
                <option >1 yr</option>
                <option >Above 1 yr</option>
       </select>
Hulk1991
  • 3,079
  • 13
  • 31
  • 46