Hi, I have a two part form which I have developed. One is for existing members and one is not.
On one of the forms I have a checkbox which will need to be checked before they can proceed, to determine that they are on the correct form. I will use the radio button which hides and unhides forms.
However when I try to get a handle on if the radio button is checked and then checking to see if the checkbox is checked I get nothing returned.
Can someone help me implement this? My JS is below or view my JSFIDDLE:
$(document).ready(function(){
var check;
if($("input:radio[name=existingpartner]").is(":checked")){
// Example 3 - With jQuery prop
$("#test-with-prop").on("click", function(){
check = $("#mycheckbox").prop("checked");
if(check) {
alert("Checkbox is checked.");
} else {
alert("Checkbox is unchecked.");
}
});
});