Forum Discussion

ChrisChris's avatar
ChrisChris
Qrew Assistant Captain
8 years ago

Can I hide the green Save Record button?

Hi,

I'd like to force Everyone On The Internet to use a custom Save Record button and remove the green Save buttons. Is this possible?

Thanks

CGreene

21 Replies

  • IOL with this selector:

    $("#saveButton, #saveButton + a").hide();

    The second selector uses the adjacent sibling combinator + to select the split button dropdown after the save button.

    I should add that while we can safely continue to modify the DOM like this it will likely become more problematic as QuickBase moves forward using frameworks like angular and react to manage the "views". Never fear we will just tap into those frameworks with our JavaScript - or just modify the page using Service Workers before the browser tab has a chance to even see the page.

    There is no stopping Service Workers. You will want to be on the cutting edge of this new technology!!!!!
  • I updated my answer where I wrote "adjacent sibling selector +" where I should have wrote "adjacent sibling combinator +".

    In any event, creating your own Save button might not give you all the functionality of the real save button. There are a number of things the QuickBase Save button does behind the scenes that may not be apparent such as conflict resolution or field validation. So even if you Save button appears to work now for simple cases you might get a different behavior with one of the edge cases.

    When I modify the behavior of a QuickBase form I try to make the least invasive change to the page. Often time this is done through writing script that either automatically creates or intercepts a user action. You can think of such a script as as acting like an "invisible friend" that is generating user input on your behalf through script. In this fashion you script will not interfere with QuickBase code.
  • how do I apply this on my app. I want to hide the standard quickbase save and save & add new button on the top right corner and instead use the custom save button created using formula url. to ensure users use this instead of standard button. The button should be disabled on form add/edit.

    Can I request for step by step instructions for this. Any help will be appreciated.
  • Create a formula text field in the table, add the below code and enable the "Allow HTML" as checked 
    "<img qbu=\"module\" src=\"/i/clear2x2.gif\" " & "onload=\"javascript:if(typeof QBU=='undefined'){QBU={};$.getScript('" & URLRoot() & "db/" & Dbid() &"?a=dbpage&pagename=module.js&rand='+Math.random())}\">"

    then create a new page by 

    Home-Settings-Pages 

    Create a new page with the below code
    $(".IconOnly").hide();
    $("#saveButton").hide();

    Save the page 

    Create a new record , now you won't have a save button !!
    • donaldlundgren1's avatar
      donaldlundgren1
      Qrew Trainee
      This works great but Id like to know what the code in the Formula text field means, can you please explain it as Im pretty good with JS in QB but I dont follow some of this
    • donaldlundgren1's avatar
      donaldlundgren1
      Qrew Trainee
      I dont follow the following:
      what does the qbu mean
      and where did you find the source src=\"/i/clear2x2.gif\"
  • This worked great. With the new Save Button quickbase added at the footer though this only hides the header. anychance you have an update that i can copy and past in? 
  • The new footer Save Button has an ID of "footerSaveButton" so simply add this line below:

    $("#footerSaveButton").hide();
    • KellyBianchi's avatar
      KellyBianchi
      Qrew Assistant Captain
      If you add &ifv=1 to the end of the url, it will remove everything. Then you can establish your own buttons.
    • JanaBaker's avatar
      JanaBaker
      Qrew Cadet
      This is awesome!!  

      What is the syntax for creating a button for:

      1. saving and redirecting back to a dashboard page
      2. saving and redirecting to the same form that you are on (not the main form)

      Again...this post was great!
  • Would you be so kind to post the JavJavaScript to have the button read "Save & Keep Working" on load? thanks in advance
    • JoshuaCase's avatar
      JoshuaCase
      Qrew Cadet
      Is this still possible?  This would be for a set role and not a EOTI role.  I would like the user to be able to edit a record but force them to use a formula button I created to save the record that also in the background sends data to another connected table.

      ------------------------------
      Joshua Case
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Would Automations help you here?
        re:  created to save the record that also in the background sends data to another connected table.

        ie Can you have the user do a normal save and the trigger an Automation to add that record in another table?  So a no code, no risk solution.



        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------