visibility and radio buttons
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();
}
});
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();
}
});
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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
{
...
}
});
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
{
...
}
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests