Skip to main content
Question

Magic Button Question - Changing Appearance after clicking

  • January 5, 2020
  • 0 replies
  • 91 views

Hi All, 

I have searched but can't seem to find this option. 

I have already created a formula url button that runs a few actions (checks a box, notes the user that clicked it, and refreshes the page). 

Is there a way to have the appearance of the button change whether it's been clicked or not (maybe using the checkbox I mentioned above)?

Example: Before button displays as green and text "Click to Approve" and after clicked display as red and text "Approved". 

The main issue I'm dealing with has to do with this button in reports. In the form view, I'm able to make it appear that it has changed by using two buttons and form rules, but this doesn't allow someone to know that the button on the record has already been clicked when clicking the button in report view. 

Any ideas?

Thank You!
Chris


------------------------------
Chris
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
You can do this with a Formula Rich text field,

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

// note that you already have a formula URL field so you can just use this instead of the above line

var text ToggleApproval = [my existing URL formula field];

var text URL =
"javascript:" &
"$.get('" &
$ToggleApproval &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);";

If([checkbox]=true,

"<a class=\"Vibrant Danger\"a href=" & $URL & ">" & "Click to reverse Approval" & "</a>",
"<a class='Vibrant Success' style='border:1px solid #6BBD57; background-color:#6BBD57'" & "a href=" & $URL & ">Click to Approve</a>")

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