These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Text Field - Can I change the Caption fill color dynamically?

paatchen
Registered: Jan 21 2010
Posts: 5

I have hunted all over this site, I am still not able to figure this one out.

I am using this code to change the fill color of the Text Field:

if(myfirstfield.rawValue == null) then
mytextbox.border.fill.color.value = "255,255,0"
endif

This currently fills in the entire text field (caption and input).

I would like to only highlight the caption of the Text Field.

I am using LiveCycle Designer 8. I do not mind using JS if FormCalc is not the best option to do this.

Thanks so much for any help,
~Toph

Thanks,
Toph

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

there are two properties you can use to change the fill color of a text field.
The one you use is the correct one, but while the other one is not defined, it has no the effect you wold like to see.
To solve this, you need to fill the input area with a color (ideal is white) too.
Otherwise it's transparent and has the same fill color as the entire text field.

  1. if(this.rawValue == null)
  2. {
  3. // fill color of the input area
  4. this.ui.textEdit.border.fill.color.value = "255,255,255";
  5. // fill color of the whole text field
  6. this.border.fill.color.value = "255,255,0";
  7. }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

paatchen
Registered: Jan 21 2010
Posts: 5
Thanks, I will give it a try. Disregard my PM I sent you. I had not seen this yet. Thanks and I will keep you posted.
Toph

Thanks,
Toph