Code page abort save

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
Is there any way, using javascript, in a code page to abort the save.

My current system is that I have a field in the form that is set to required. I then use the QuickBase API to check if certain records are in place, this lets me know whether or not the form should be able to save. I am using the $.get() method to call the API; I have also used the $.ajax() method, but I still have the same issue that those methods run after QuickBase starts to save the form and I need them to run first. Is there a way I could have them abort the save, if need be, or to force them to run at the time they are called, and not during the save process of QuickBase
Photo of Ya'akov Goldberg

Ya'akov Goldberg

  • 210 Points 100 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
A simple idea might be to re-frame your idea of aborting the save and just remove the save button from the page if they're not supposed to be saving. I'm not sure what method you're using to call your code, but if you're on the form it'll be much easier just to remove the button than trying to stop them from clicking save.

If you add some jQuery and do: 
$("#saveButton").hide()
$(".IconOnly").hide()
$("#footerSaveButton").hide()

It'll remove the header and footer saves and arrows



Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
Photo of Ya'akov Goldberg

Ya'akov Goldberg

  • 210 Points 100 badge 2x thumb
I hadn't thought of removing the save button, that should hopefully work, thank you.