- Wed Sep 26, 2018 4:51 am
#816285
Hello,
I have a form which has many subforms and I use a radio button to switch between them by show\hide function now when I go to the next step I want only to get the subform that got populated with the information and hide other subforms and to do this I need to get the radio button value but I couldn't get the value here is the code I used to check for the radio button value
so what went wrong?
I have a form which has many subforms and I use a radio button to switch between them by show\hide function now when I go to the next step I want only to get the subform that got populated with the information and hide other subforms and to do this I need to get the radio button value but I couldn't get the value here is the code I used to check for the radio button value
Code: Select all
the code runs to the first condition but the alert message comes with "undefined" word instead of the value.
$(document).ready(function(){
var radioValue = $("input[type='radio'][name='rd_RequestType']:checked").val();
if ($("input[name='rd_RequestType']:checked")) {
alert(radioValue);
}
else {
alert('No Value');
}
});
so what went wrong?