Forum Discussion

JENNIFERPASCHAL's avatar
JENNIFERPASCHAL
Qrew Trainee
4 years ago

Grey Out Button URL Formula After Click

Hello,

I know, using IF statements, it is possible to hide URL formula buttons once clicked but I am looking for a way to grey out/change the color of the button once clicked. So for example, if the button "Click Me" was green and the user clicks it, the button would change to a grey color. Is this at all possible?

------------------------------
Thanks in advance,
Jennifer Paschal
------------------------------
  • Is there a field we can hook on to know that the button has been clicked?  Something we can hook an IF statement onto?

    Also after the button is clicked do you want the button to be non-clickable or just change colour but still be clickable

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JENNIFERPASCHAL's avatar
      JENNIFERPASCHAL
      Qrew Trainee
      There a checkboxes hooked on in the URL statement that get checked when the button is clicked. 

      The button only needs to change color and can remain clickable.

      ------------------------------
      Thanks in advance,
      Jennifer Paschal
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        You cannot change the color of a URL formula URL button, but if you make a Formula Rich Text button then you can control the color.  There is more than one way to do it, but I think that this is the most simple code to color a button.

        The formula includes as comment lines all the all the possible colors for the buttons when using the "Vibrant' syntax shortcut 

        var text Words = "Click here to Toggle";

        var text Checkbox = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
        & "&_fid_12=" & not [checkbox];

        var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

        var text URL =
        $Checkbox
        & "&rdr=" & URLEncode($RefreshPage);

        If([checkbox]=false,
        "<a class=\"Vibrant Primary\"a href=" & $URL & ">" & $Words & "</a>", // blue
        "<a class=\"Vibrant \"a href=" & $URL & ">" & $Words & "</a>")  // gray





        // "<a class='Vibrant'>Vibrant</a>", // regular grey button
        // "<a class='Vibrant Alert'>Vibrant Alert</a>", // yellowish
        // "<a class='Vibrant Danger'>Vibrant Danger</a>", // red
        // "<a class='Vibrant Primary'>Vibrant Primary</a>", // blue
        // "<a class='Vibrant Snowy'>Vibrant Snowy</a>", // white
        // "<a class='Vibrant Success'>Vibrant Success</a>" // green

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