Page 1 of 1

visibility and radio buttons

Posted: 11 Feb 2015
by oren944
Hello,

I am trying to hide the information when the radio button is selected to no and then when the user click on yes the information appears.

this is what i have so far....

fd.field('Office_x0020_Contact').control().change(function()
{
if (fd.field('Office_x0020_Contact').value() == 'No')
{
$('.fd_field[fd_name="Office_x0020_Location"]').hide();
$('.fd_field[fd_name="Office_x0020_Phone_x0020_Number"]').hide();
$('.fd_field[fd_name="Office_x0020_IM"]').hide();
$('.fd_field[fd_name="Office_x0020_Mail_x0020_Box"]').hide();
}

else
{
$('.fd_field[fd_name="Office_x0020_Location"]').show();
$('.fd_field[fd_name="Office_x0020_Phone_x0020_Number"]').show();
$('.fd_field[fd_name="Office_x0020_IM"]').show();
$('.fd_field[fd_name="Office_x0020_Mail_x0020_Box"]').show();
}
});

Re: visibility and radio buttons

Posted: 12 Feb 2015
by Dmitry Kozlov
Hi,

Radio button fields return index of the selected option:

fd.field('Office_x0020_Contact').control().change(function()
{
if (fd.field('Office_x0020_Contact').value() == 1)
{
...
}
else
{
...

}
});

Re: visibility and radio buttons

Posted: 12 Feb 2015
by oren944
Thank you! Much appreciated