rjohns Posted September 11, 2015 Share Posted September 11, 2015 I'd like to change the font color of some text using the value of a field. The field value is the same as the color named defined in FusionPro. Basically, I'm trying to shortcut having to write a couple of lines of code for each color. I've approached it thinking I could write a text rule: return '<span color=Field("Inside Text Color")>' + Field("Optional Top Message"); But it doesn't seem to be picking up the value of the Inside Text Color field. So, I tried this: var textColor = Field("Inside Text Color"); return '<span color=textColor>' + Field("Optional Top Message"); But that didn't work either. Any other ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 11, 2015 Share Posted September 11, 2015 var textColor = Field("Inside Text Color"); return '<span color="' + textColor + '">' + Field("Optional Top Message"); Or just: return '<span color="' + Field("Inside Text Color")+ '">' + Field("Optional Top Message"); Although, to make sure markup characters in the data are handled correctly: return '<span color="' + TaggedDataField("Inside Text Color")+ '">' + TaggedDataField("Optional Top Message"); Quote Link to comment Share on other sites More sharing options...
rjohns Posted September 11, 2015 Author Share Posted September 11, 2015 I completely forgot that I could break it up like that! Thanks so much for your quick response! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.