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!");



Enjoy!


CommentsLogin Required
  • Ronny Belenitsky12/17/2020 06:56
    Any kind of scripts are supported. You can also trigger scripts on any button/condition GTA pixel can be placed in the HEAD of the form
  • Titan User12/16/2020 15:29
    What pixels scripts are supported within the on-completion script button? Can pixels from google ads, the google marketing platform (floodlights), pinterest, or Facebook be placed in the the submit property?
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.