field hidden on condition

rss

Posted by jpwallace - Mar 8 ’17 at 04:43

Hi guys,

I am using the following bit of JS to hide a departure field when the flight box is unchecked and would like to show it when it is checked. Currently i cannot get this working, any ideas where i have gone wrong?

function setDeparture
if (fd.field('flight').value() == ('1') {
$('.Departure).show();
} else {
$('.Departure).hide();
}
}
fd.field('flight').change(setDeparture);
setDeparture();

  • jpwallace
    Member
    Member for: 2 years 11 months 3 days
    #1 by jpwallace Mar 8 ’17 at 05:10

    got it working, how would i add multiple fields to hide?

Displaying 1 to 1 of 1 messages