You are viewing limited content. For full access, please sign in.

Question

Question

JavaScript External URL

asked on January 31, 2023

Is there any documentation on the Modern Designer JavaScript External URL usage yet?

0 0

Answer

SELECTED ANSWER
replied on February 2, 2023

For example, in the external JS file, you have a function as following:

function changeValue(value){ LFForm.setFieldValues({fieldId: 1}, value); }

In the inline JavaScript, you have following code:

changeValue("new")

Then when you load the form, the value of the field which ID is 1 will be changed to new. 

2 0

Replies

replied on February 1, 2023 Show version history

Sorry we haven't added documentation for that part yet.

You can put the URL of an external js file in it, then the JavaScript in that external js file will run when load the form. 

For example, you can put some common used functions in the external js file, then can the function in the Inline JavaScript. 

0 0
replied on February 1, 2023

Do you have any examples of the required syntax? For the inline JS

0 0
replied on February 1, 2023

Sorry, I meant do you have any examples on how to call the External JavaScript

0 0
SELECTED ANSWER
replied on February 2, 2023

For example, in the external JS file, you have a function as following:

function changeValue(value){ LFForm.setFieldValues({fieldId: 1}, value); }

In the inline JavaScript, you have following code:

changeValue("new")

Then when you load the form, the value of the field which ID is 1 will be changed to new. 

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.