Forum Discussion
OK great. Yes, as you have discovered a regular URL field looks ugly as heck in an email and not very inviting to click.
this button information comes out of examples from Kirk Trachy and his magic buttons app. I will paste in my cheat notes directly, and you can figure it out from there. Note that the field must be formula Rich Text, and not formula URL.
var text DisplayRecordWithObsureRID = URLRoot() & "db/" & Dbid()
& "?a=dr&r=" & QB32Encode([Record ID#]);
var text URL = $DisplayRecordWithObsureRID;
var text ButtonWords = "Click here to Update ETD and ETA dates";
// Begin button style
var text bgcolor = "#34A853";
var text txtcolor = "white";
var text style = "style=\"text-decoration: none; width: 250px; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 10px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
// End button style
"<a " & $style & " href=" & $URL & ">" & $ButtonWords & "</a>"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
button with a larger font and floating width to accommodate the words
var text URL = [Log In URL];
var text ButtonWords = "Log In";
// Begin button style
var text bgcolor = "#34A853"; // green
var text txtcolor = "white";
var text style = "style=\"text-decoration: none; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 10px; color: " & $txtcolor & "; display: inline-block; font-size: 150%; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
// End button style
"<a " & $style & " href=" & $URL & ">" & $ButtonWords & "</a>"
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Hi Mark,
The buttons work in QuickBases table, but when I pull them into email, the button renders like this:
<a style="text-decoration:" none;="none;" 250px;="250px;" center;="center;" #34a853;="#34A853;" 5px;="5px;" 8px="8px" 10px;="10px;" white;="white;" inline-block;="inline-block;" normal="normal" 700="700" 24px="24px" 1="1" calibri="Calibri" ,="," sans-serif;="sans-serif;" href="https://company.quickbase.com/db/btj2wrtev?a=API_EditRecord&rid=5&_fid_8=Approved&usertoken=xxxxx&rdr=https%3A%2F%2Fcompany.quickbase.com%2Fdb%2Fbtj2wq5eb%3Fa%3DShowpage%26pageID%3D5">Approve
It's missing the closing </a> tag so it outputs as text. I'll follow-up privately with the actual button code.
------------------------------
Quincy Adam
------------------------------
- MarkShnier__You2 years ago
Qrew Legend
- Is your button a formula Rich Text field and not a formula URL field?
- Can you post your exact code with a copy paste (not a screen shot).
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------ - MarkShnier__You2 years ago
Qrew Legend
Thx for emailing me your code separately. So are you saying that the button works fine in the app but does not rener properly in email?
Mark
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------