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

Highlight Actual Field

koenigma
Registered: Jan 23 2008
Posts: 45
Answered

Having used this script in pdf documents I created it worked fine and I wanted to use it with a new form prepared with LC.

I placed the following in a Script Object called: color

color.current = new Array ("RGB", 0.5, 1, 0.5);

function gotf_color (classname){
var f = this.getField(event.targetName);
f.fillColor = color.current;
}

function lostf_color (classname){
var f = this.getField(event.targetName);
f.fillColor = color.transparent;
}

In the Field Event enter: gotf_color ("regular");

and in the Field Event exit: gotf_color ("regular");

under exit. When entering the field nothing happens.

Would someone be able to tell me whats wrong with my code?

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
The script you use is for AcroForms (Acrobat) and will not work in XFA-forms (LiveCycle).

Here is a sample form by Adobe, it shows how to change field colors in XFA-forms.

[url]http://partners.adobe.com/public/developer/en/livecycle/designer/pdfs/ChangingFieldAndSubformBGColors.pdf[/url]

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

koenigma
Registered: Jan 23 2008
Posts: 45
Just wanted to thank you for your help, and let you know I think your blog is excelent.
Kind Regards
Martin