I'm as green as one can get with JavaScript, and I'm trying to change that. I have a Radio button asking the user "Are you a Department Head?" with the options of Yes or No. I also have a hidden text field that stores a Yes or No value. Now, I want a radio button selected based off of the value in the hidden text box.
The checkbox field ID is 8.
The hidden text box field ID is 58.
I only have 4 lines of code in JS, and it's not doing anything at all:
LFForm.onLookupDone(function() {
if(LFForm.getFieldValues){fieldId:58})=="Yes"){
LFForm.setFieldValues({fieldId:8}, {value: "Yes"});}
}, {lookupRuleId:19});
I know that I'm missing something. I just don't know what it is.