Code Page Run When New Form Is Saved

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • In Progress
I have a code page that works properly. I am using the Image On Load system to get the code page to run; however, I don't want the code to run on load. I want it to only run when the user hits "Submit".

I have tried to use the "onclick" method of the HTML element, but the save code from QuickBase runs first. The optimal solution would be to have my code run before the code for QuickBase, but how do I do this?
Photo of Ya'akov Goldberg

Ya'akov Goldberg

  • 210 Points 100 badge 2x thumb

Posted 4 months ago

  • 0
  • 1
Photo of Wayne Major

Wayne Major

  • 340 Points 250 badge 2x thumb
Change the inner HTML so that the submit button is an anchor tag, and use onclick() to run your function.

example:

$("#saveButton").html("<a onclick='alert()';>Submit</a>");

'alert()' can be any function you want.

note: you will be directly overriding the code quickbase had existing already so you might want to test a bit and make sure you dont break the button.