I’m using the jQuery Validation Plugin. Working great, but I’ve got an issue with radio buttons.
I’ve got side by side buttons in a table row like (It’s an older layout and I’ve not had time to kill all the layout tables everywhere yet … don’t judge!):
<td >
<input name="guestAGE" type="radio" id="guestAGE" value="y" /> On
<input name="guestAGE" type="radio" id="guestAGE" value="n" /> Off
</td>
I need the error message to come up AFTER the last button and “Off”.
So far, I can get the message to displace the buttons on the left, can get it to appear BETWEEN the buttons … but that’s not what I want.
Trying to use error Placement like below puts it BETWEEN the last button and “OFF”
errorPlacement: function(error, element) {
if (element.attr('type') === 'radio') {
error.insertAfter(
element.siblings('input[type="radio"][name="' + element.attr('name') + '"]:last'));
}
else {
error.insertAfter(element);
}
}
Pulling by hair out. How can I get it like (consider 0 represents a radio button below:
0 YES 0 NO STUPID ERROR MESSAGE GOES HERE AFTER EVERYTHING
ACK! Thanks in advance …