Cannot get Custom Button function to Work


I am trying to write a custom function for a button.

I have the following js written for the button:

fd.control('toSaveButton').onclick = 'saveAdditional();';

What should I include in the 'Click' area of the button on the design side of the form? Is there anything else I need to change to get this function to run on click?

Thanks for the help,
Mike M.

Hello @mmendes,

If you want to call a function that you wrote in JavaScript editor, you should make the function global. Add the function to the "window" object like this:

window.myFunction = function() {

fd.spRendered(function() {


And this is the code you add to the button's Click property: