I want to have a single line text field to populate with N/A if a certain choice (multi-choice) is selected.
For example:
Choices:
Apple
Oranges
Pear
Apple Stock: In Stock
Orange Stock: In Stock
Pear Stock: In Stock
-----------------------------------------------
If apple is selected, N/A should appear for Apple Stock: N/A. If both apple and orange are selected, N/A should appear for both Apple Stock and Orange Stock.
Currently, I have this for Javascript, and nothing happened upon the choice selection (still a newbie). I have assigned the Javascript variables - one to the choice control (varFruits), another to the line section (varApple):
NWF.FormFiller.Events.RegisterAfterReady(function () {
NWF$('#'+varFruits).change(function(){
if (NWF$('#'+varFruits + ' input:checked').val() == 'Apple'){ NWF$('#'+varApple).val('N/A');
}
})
})
Thank you for any insight!