mgildea / Multi-Step-Form-Js

Multi Step Form with jQuery validation
MIT License
49 stars 25 forks source link

Radio button validation #7

Closed samandalso closed 7 years ago

samandalso commented 7 years ago

I'm having difficulty getting the form validation to work with groups of radio buttons when hitting the next button. Any thoughts?

mgildea commented 7 years ago

can you give an example of what you are experiencing?

View this updated working jsfiddle including radio button groups: http://jsfiddle.net/ez94n125/30/

Try reviewing this stack overflow discussion: https://stackoverflow.com/questions/277589/validation-of-radio-button-group-using-jquery-validation-plugin

samandalso commented 7 years ago

I've discovered it's because I'm trying to validate hidden fields (using them in tandem with labels) to make custom radio buttons. I've tried adding "ignore: []," to the options but doesn't seem to be working yet. I'm still looking around. I'll post if I find the solution.

samandalso commented 7 years ago

Okay, so I solved this by adding this to the js:

var defaults = {
  activeIndex: 0,
  validate: {
    ignore: []
  }
};
samandalso commented 7 years ago

Just out of curiosity do you have any examples with animated transitions? Assuming you could use the event listener to run them...

mgildea commented 7 years ago

I don't have any examples at the moment, but want to add that to the demo I have linked to in the README soon.