Can I hide the green Save Record button?

  • 0
  • 2
  • Question
  • Updated 3 weeks ago
  • Answered

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

Photo of Chris

Chris

  • 4,430 Points 4k badge 2x thumb

Posted 3 years ago

  • 0
  • 2
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,074 Points 20k badge 2x thumb
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!!!!!
Photo of Chris

Chris

  • 4,430 Points 4k badge 2x thumb
Excellent! Works perfectly. Thank you.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,074 Points 20k badge 2x thumb
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.
Photo of PSA

PSA

  • 30 Points
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.
(Edited)
Photo of John Thomas

John Thomas

  • 1,082 Points 1k badge 2x thumb
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 !!
(Edited)
Photo of donald lundgren

donald lundgren

  • 130 Points 100 badge 2x thumb
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
Photo of donald lundgren

donald lundgren

  • 130 Points 100 badge 2x thumb
I dont follow the following:
what does the qbu mean
and where did you find the source src=\"/i/clear2x2.gif\"
Photo of Michael Bralow

Michael Bralow

  • 204 Points 100 badge 2x thumb
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? 
Photo of Nathan McCue

Nathan McCue

  • 100 Points 100 badge 2x thumb
The new footer Save Button has an ID of "footerSaveButton" so simply add this line below:

$("#footerSaveButton").hide();
Photo of Michael Bralow

Michael Bralow

  • 204 Points 100 badge 2x thumb
perfect. thanks for the quick turn around!!
Photo of Kelly

Kelly

  • 1,812 Points 1k badge 2x thumb
If you add &ifv=1 to the end of the url, it will remove everything. Then you can establish your own buttons.
Photo of Jana

Jana

  • 324 Points 250 badge 2x thumb
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!
Photo of Francesco Spiga

Francesco Spiga

  • 274 Points 250 badge 2x thumb
Would you be so kind to post the JavJavaScript to have the button read "Save & Keep Working" on load? thanks in advance
Photo of Francesco Spiga

Francesco Spiga

  • 274 Points 250 badge 2x thumb
Would you be so kind to post the JavJavaScript to have the button read "Save & Keep Working" on load? thanks in advance