Hi, I'm exploring whether I can migrate some code to modern forms. In the JavaScript API, how do set code to wait to run until the form is fully loaded--the equivalent of Jquery's "$( document).ready (..."
Question
Question
Document Ready in javascript API
asked on October 27
•
Show version history
0
0
Answer
APPROVED ANSWER
SELECTED ANSWER
replied on October 27
•
Show version history
The Document Ready function (or equivalent) is not needed in the newer designer. All code will run after the form is fully loaded.
Note that the new designer runs vanilla Javascript rather than JQuery and doesn’t have direct access to the form components and the DOM, only the functions included as part of the LFForm interface. The code actually runs within a sandboxed iFrame.
Also, a ton of things that required scripting in the Classic designer have native functions now (check out how powerful Field Rules are now) so a lot of code isn’t even needed anymore.
My apologies if I’m making points you are already aware of. Good luck with your scripting!
2
0
Replies
You are not allowed to reply in this post.
You are not allowed to follow up in this post.