I have a radio button that selects a dealer in my checkout. I need this button to automatically be checked for the user - however, no matter what I do, the radio button still needs to be clicked to validate.
Here's what I've tried so far:
document.getElementById("#dealer-selection-" + elm.id).click();
This makes the radio button show up as if it's been clicked, however when submitting form, a notice still pops up with a validation error.
jQuery('.forhandlerRadio:first').attr('checked', 'checked');
Same thing as above - this shows the radio button as clicked, but for the purposes of the submit button, it is not.
jQuery("#dealer-selection-" + elm.id).trigger("click",function(){
selectDealer(jQuery(this).val());
});
Again, this shows the button as clicked, but it is not.
I have even tried simply adding checked="CHECKED"
to the radio button itself, which also shows as checked, but does not validate.
Thanks in advance