Discussions

Expand all | Collapse all

Code Page Run When New Form Is Saved

  • 1.  Code Page Run When New Form Is Saved

    Posted 01-07-2019 20:36
    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?


  • 2.  RE: Code Page Run When New Form Is Saved

    Posted 01-07-2019 20:56
    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.