Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to highlight text or make a check mark another color?

Avatar

Former Community Member
I'm trying to make a bunch of forms for my job and am running into some frustrating things.



I would like to make the check marks different colors when someone checks a box as well as possibly highlight or change the color of the text and am hitting a wall. I've tried the font section, the xml code, etc and nothing. I even asked tech support and they don't know?!?!?!



I know it can be done because we use a secure form that does it all the time, but I can't copy it or look at how they did it. It was created by another dept and no one knows. I didn't think this was going to be this difficult.



Any help would be greatly appreciated. Thanks :-)
2 Replies

Avatar

Former Community Member
I found a way to do this by using some acroform script in the xfa form. You could put this on the enter event of the checkbox. Note that it is Javascript.



//get the doc object

var oDoc = event.target;

//now get the acroform field

var f = oDoc.getField("form1[0].Page1[0].CheckBox1[0]");

//set the color of the check char to red

f.textColor = color.red;

Avatar

Former Community Member
That didn't work for me, but thanks for trying. :-) This really shouldn't be this difficult I would think. Maybe the next version will be easier :-)