Previous | Next | (P-PDF) Forms & FDF
Topic: Set Color to a Field Value
Conf: (P-PDF) Forms & FDF, Msg: 77587
From: george
Date: 12/3/2002 04:40 AM
> objFdf.FDFSetValue "Name","George", Off.
That last parameter should be either False or True, not Off, unless you have a variable named Off.
> I would like to set a color to this particular field (e.g.
> Red). What is the piece of code I need to add?
There is no direct way to set a field's color (border, background, text) with an FDF, but you can use JavaScript to make the change. If all of your users will have 5.x, then you can include the relevant JavaScript in the FDF. See that latest FDF Toolkit documentation for more information.
If it has to work with previous versions, then you can set up a (hidden) dummy text field whose Validate JavaScript is:
eval(event.value);
You can then pass the relevant JavaScript as the value of this field:
objFdf.FDFSetValue "text1", "getField('text2').bgColor = color.red;", False
> Please reply to sanjaykulk@hotmail.com
Sorry, most people here won't do that.
George