Forum Discussion

CarlosCarlos's avatar
CarlosCarlos
Qrew Assistant Captain
6 years ago

DoSave button options?

There seems to be a lot of options when using custom buttons/javascript with onclick="DoSave()" functionality. 

Does anyone have a "cheatsheet" regarding the different options there are, and how each works, and the parameters that may be included ?

onclick="DoSave()"
onclick="DoSaveAdd()"
onclick="GeditDoSave(dbid,true)"  (no idea what the "true" is for here, for example)

(Question comes as I was trying to use a pop-up window with an &ifv of a record, to add a file attachment, as it provided a cleaner look for the user, but save functionality of DoSave doesn't attach the file, only saves the record).




2 Replies

  • I would not use these functions. Years ago QuickBase's form submission was a lot simpler and the DoSave() function was very prominent in the source code. Today the form is a lot more complicated and there other services provided by the form submission other than simply submitting the for data. Calling DoSave() or other QuickBase authored functions may well short circuit some of these features.

    The better solution is to arrange for your script to emulate or intercept user input. This way you can gain control over the form without modifying QuickBase's authored code.

    var originalClickHandler = $("#saveButton").data("events").click[0].handler; 
    $("#saveButton").unbind("click");
    $("#saveButton").click(function() {
      //your code here
      //conditionally call QuickBase's originalClickHandler();
      //originalClickHandler();
    });
  • Hi Dan,

    I also had a similar question to this and I came across your suggestion. What you said make sense. What I am trying to do is create new UI buttons that are rephrased and side by side so its a bit more user friendly.

    New button 1: function save and close - "Done"
    New button 2: function save and add another - "Add Another"


    I was using:

     "<img onclick='DoSaveAdd()'src=https://images.quickbase.com/si/16/015-save_0.png height='20' /> click diskette to save"


    What do you suggest I do to make this happen?