I'm attempting to get a calculated field to update as the dropdown values change.
In the example below - the problem is that the calculated value refuses to change if only "Landscape" is selected and subsequently unchecked. This issue does not occur if "Portrait" is already checked.
There is no problem with the "Portrait" option - the calculated value always updates correctly.
Is there something wrong with my script?
NWF$(document).ready(function () {
NWF$("#" + PosterOrientation).change(function () {
if (!NWF$(this).find(':checkbox[value='Portrait']').prop('checked')) {
NWF$("#" + NumberRequiredPortrait + " option:selected").removeAttr("selected").trigger('change'); }
else
if (!NWF$(this).find(':checkbox[value='Landscape']').prop('checked')) {
NWF$("#" + NumberRequiredLandscape + " option:selected").removeAttr("selected").trigger('change'); }
});
});