On Completion Script in Button

Last updated May 18 2018

What is the On Completion Script?
This special feature allows you to attach a custom Javascript code to 3 types of button (Submit, Draft and SF Action button). 
Scripts like Google analytics events, Tracking codes, and other scripts you may think of.
How does this work?
In a nutshell, the script is executed after the filler presses the button and it completes its task.

Following are steps to add such a script:

- Select the button on canvas
- Go to the buttons settings in 'Properties' panel > 'Element' tab > 'Settings' option > 'Basic' category 
- Turn on the 'on completion script' checkbox (below the button type)

- A 'Script' textarea will open, and you will be able to insert your custom Java script code there.
Please note that you can also insert the form fields values in the code. For example: if your name field ID is fld3 you can do the following:
alert("Hello - ftElement.fld3, Thanks for filling in my form!");


CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.