I am trying to use LFForm.changeActionButton to change the text of the submission button based on the result of a look up. I get this Uncaught TypeError listed in the title when I load the page.
Here is my code:
LFForm.onLookupDone(function () { let parentID = LFForm.getFieldValues({fieldId: 5}); if (parentID == 422624) { LFForm.changeActionButton("Submit", {label: "Close"}); } else if (parentID == 4229023) { LFForm.changeActionButton("Submit", {label: "Open"}); } else { LFForm.changeActionButton("Submit", {label: "No Case Found"}); } }, {lookupRuleId: 1});
Any suggestions? I copied the code from Business Processes > Creating a New Form > CSS and JavaScript in the Forms Designer > The LFForm Object document