Skip to main content
Question

Hover over text reveal - as demoed by Kirk Trachy at Empower

  • June 24, 2019
  • 0 replies
  • 38 views

Hello. I'm attempting to leverage the formula rich text driven hover-over-to-reveal-text functionality that Kirk demoed at Empower 2019 via his Magic Buttons app (see code below). I find that when the text that is being revealed contains a single apostrophe, the the revealed text ends up cutting off at that apostrophe. Any thoughts on how this might be addressed? Thanks!


"<div style=\"width:100px;\">  "& Left(Right([Notes],"["),140) &"</div>"&
"<a href='"&Dbid()&"?a=dr&rid="&[Record ID#]&"' title='"&[Notes]&"' target=\"_blank\" \"> hover or click...</div></a>"
This topic has been closed for replies.

Sounds like you need to use the SearchAndReplace function to replace the usage of apostrophes with a character the HTML will allow. Something along the lines of

//This will replace ' with nothing
var text apost = SearchAndReplace([Text field you want hovered],"'","");
$apost

//This will replace ' with \" meaning the HTML will interpret the " literally.
var text apost = SearchAndReplace([Text field you want hovered],"'","\"");
$apost


Also not sure if you copied this formula or if this is only partially copied - but your tags at the end look a little out of order from a quick glance. You open the <a> but then close out with a </div> before you officially close out with a </a>.

Chayce Duncan | Director of Strategic Solutions
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base