Discussions

 View Only
  • 1.  This is !important

    Posted 02-07-2018 16:28
    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!


  • 2.  RE: This is !important

    Posted 02-07-2018 19:24
    Purple Rain class


  • 3.  RE: This is !important

    Posted 08-01-2019 18:36
    For others who find this post, it is important to keep your formula strung together; otherwise it will not work. See below.

    "<div class='Vibrant Success' style='background:#74489D!important;border:#74489D' onclick='RedirectURL.value=\"https://laurahillier.quickbase.com/db/bpthgwskf\";DoSave();'>Submit Nomination</div>"