Skip to main content
Nintex Community Menu Bar
Question

Is there a way to change color on template merge field text


Forum|alt.badge.img+6

In the template below, Is there a way to change the text color of ‘Product on Allocation’ if 'On_Allocation is true?  Can you embed CSS or HTML?


fad2a0a9605739173a4c5c5fc421392c6ee23be2.jpg

Did this topic help you find an answer to your question?
This topic has been closed for comments

9 replies

Forum|alt.badge.img+9

Try something like this:

{{#On_Allocation__c}}<font style="background-color:red;color:white;font-weight:bold;padding:3px;position: relative;"> -- PRODUCT ON ALLOCATION </font>{{#On_Allocation__c}}

Forum|alt.badge.img+6

Hi Moshe,

Thank you very much for the reply. I tried the following, simplify it a bit, but there was no change to the test displayed? Any thoughts?

{{Name}}{{Description}} – PRODUCT ON ALLOCATION {{Product_Category__c}}


Forum|alt.badge.img+18

Jeffrey… do you have “allow html” checked on your template settings?


Forum|alt.badge.img+11

You probably don’t won’t to use the tag as it is not supported in HTML 5. Use a instead. I will leave it to our fellow web brethren to correct me. {{Name}}{{Description}} – PRODUCT ON ALLOCATION {{Product_Category__c}} Oh, yes, enable “Allow Html” per Jim.


Forum|alt.badge.img+6

I do not think I can "Allow HTML" as this is just the Display Template/Search Template fields for the Search properties on a lookup field.  This is not a Template component field.

d87c6aa8e3702f3d6a5f5ae68a0da0450c248d3f.jpg 


Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

You can certainly embedd html in a normal template,  but you are using the templates provided to show reference fields.  HTML is not interpreted here.  This looks like a perfect scenario for writing a custom renderer.  JavaScript to the rescue. 


Forum|alt.badge.img+5
  • 28 replies
  • July 9, 2024

Hi, how could I put a snippet and invoke it on loan for this case?


Forum|alt.badge.img+18

In the Basic menu for the field choose ‘snippet’ for the rendering property, and enter the name of your snippet in the box that appears. There are lots of examples of custom field renderers here on the community and in the docs.


Forum|alt.badge.img+5
  • 28 replies
  • July 9, 2024

Hi Matt, there’s no way to invoke snippet inside template field, right?
e3da07ad96134e3739b2875b08ae3a981b352928.png


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings