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

Dynamic form font color after submitting

marcw21
Registered: Jun 1 2011
Posts: 2
Answered

I have a dynamic form that when a user clicks a checkbox the caption color turns red, otherwise the captions is black.
 
When the submitted form is opened the caption color of the checked box is black instead of red. How can i get the caption to remain red?
 
Thank you,
Marc

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

the problem you have is that the font color is controlled by the change:Event of the checkbox.
This will work during runtime, but when the form is reopened this event doesn't fire and the font color is restored to it's default value.
You have to move your script to an event which will cover both purposes such as layout:Ready.

  1. Form1.#subform[0].Textfield1::ready:layout - (JavaScript, client)
  2.  
  3. this.caption.font.fill.color.value = ChkBox.rawValue === 1? "255,0,0" : "0,0,0";

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

marcw21
Registered: Jun 1 2011
Posts: 2
Thank you very much!