Show/Hide Field based on Checkbox Selection
Hi,
I have a multichoice checkbox and another field. I want to be able to show or hide the field if the first item in the checkbox list is selected. I've done the following code but it's not working. Please advise.
function setSafetyImpact(){
var checkboxIndex=0;
if(fd.field('EventImpact').control()._el().find('input[type="checkbox"]').eq(checkboxIndex).is(':checked')){
//show field
$('.safety-impact').show();
}else{
//hide field
$('.safety-impact').hide();
}
}
fd.field('EventImpact').change(setSafetyImpact);
setSafetyImpact();
I have a multichoice checkbox and another field. I want to be able to show or hide the field if the first item in the checkbox list is selected. I've done the following code but it's not working. Please advise.
function setSafetyImpact(){
var checkboxIndex=0;
if(fd.field('EventImpact').control()._el().find('input[type="checkbox"]').eq(checkboxIndex).is(':checked')){
//show field
$('.safety-impact').show();
}else{
//hide field
$('.safety-impact').hide();
}
}
fd.field('EventImpact').change(setSafetyImpact);
setSafetyImpact();
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests