This is !important

  • 0
  • 1
  • Question
  • Updated 10 months ago
  • Doesn't Need an Answer
  • (Edited)
So I was thinking of nominating myself over at the 2018 Quick Base Customer Awards but I am actually not a customer (so I am probably ineligible) but more importantly I didn't see the category I was looking for:

The Quick Base Visitor Award
To the Quick Base visitor who brings scripting, APIs and advanced web innovations from the future to improve the evolution of Quick Base technology on Earth. This person empowers entire planets and civilizations with the confidence and courage needed to make a real impact on their organizations and the Quick Base community through the application of the seemingly unrelated topics such as Category Theory, decoding the secrets of the Voynich Manuscript. and other gimmicks.




But that is not why I post this message. Apparently these is a nice little tip you can get out of examining QuickBase's nomination form:

https://team.quickbase.com/db/bneu8emfj?a=nwr

If you inspect the Submit Nomination button on the page you can see how QuickBase designed the button:



Here is the relevant code slightly reformatted for display in the forum:
<div
  class="Vibrant Success" 
  style="background:#74489D!important;border:#74489D"
  onclick="RedirectURL.value='https://team.quickbase.com/db/bndx2prnt?a=dbpage&pageID=15';DoSave();">;
  Submit Nomination
</div>

So what the builder of this form is doing is (1) creating a custom save button with the new "purple rain" class "Vibrant Success", (2) declaring the background color #74489D to potentially override the class styling and (3) setting the click behavior to save and redirect to the HTML code page stuffed into the hidden RedirectURL input.

I have never seen this precise arrangement of a form but it does seem pretty useful.

Final comment - don't forget to use the !important designator - its important!
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 27,884 Points 20k badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Photo of Jim Harrison

Jim Harrison

  • 1,770 Points 1k badge 2x thumb
Purple Rain class