Forum Discussion

AdamKeever1's avatar
AdamKeever1
Qrew Commander
5 years ago

Working Formula to Change Font Style, Size, Color etc...

Here is an easy way to change the native Quick Base font and background of the entire page of a table report or form.

This information is also in a reply to another thread, but I wanted to start a new one with a specific subject and hashtags.

There is an old thread that has some code that you can put into a formula rich text field that will increase the font size for all of the text in a report. Here is the link to the original thread:

link

This solution was crafted by @_anom Diebolt). I found that it can be expanded to include other CSS elements and styling and can also be coupled with the .hide() function to remove various elements from the page.

Take this code and paste it into a rich text formula field. The first two lines style the font and the third adjusts the background color; 100.5% is the font size parameter while Nirmala UI is the font type. This is just for example and it can be tailored to your specific need so feel free to delete any of the styling that you don't need or like.
"<img src onerror='$(`*`).css(`font`, `bold 100.5% Nirmala UI`);'>
<img src onerror='$(`*`).css(`color`, `blue`);'>
<img src onerror='$(`*`).css(`background-color`, `lightgrey`);'>
<img src onerror='
$(\"#navTop\").hide();
$(\"#tablesMenuBarWrapper\").hide();
$(\"#TableNPageBarSeparator\").hide();
$(\"#pageNavBarTray\").hide();
$(\"#stdCustThisFormButton\").hide();
$(\"#formFooterButtonsContainer\").hide();
$(\"#customBasicBrandMenus\").hide();
$(\"#recordNavBar\").hide();
$(\"#signInLink\").hide();'>"


In the interest of the user experience, title the field - so that it doesn't take up space and add it as the last field in your table so it is out of the way. If you use it on a form, just tick the check box for an alternate title and leave it blank to not show the - on the form. You can make many of these formula fields and add them to various forms and tables to create different styling for each, they will just have to have unique field titles.

Here is the original table report:


And here is the result of using the formula rich text field on a table report:

Here is the result on a form:

This does not work on the mobile app.

#formula #font #style #color #background #size #hide #report #form #custom #customize #UI
​​​​​​​​​​​​

------------------------------
Adam Keever
------------------------------
  • This can be used to create "dark mode" for those who prefer that; just change background to black and text to white:



    ------------------------------
    Adam Keever
    ------------------------------