I have a checkbox and would like to change the color of an other field depending on activating the checkbox.
the other field isn't an empty field, there is already text in it. is it possible only to change the background color of this field if the checkbox is activated?
can you please help me
Sure. As the Mouse Up event of the check-box field you can use something like this:
this.getField("Text1").fillColor = (event.target.value=="Off") ? color.transparent : color.yellow;
How is the data loaded? If it is from an FDF file, then the FDF can contain a script to setup the correct color values.
If the form is open in Acrobat when the data is loaded, then you can use a script that is triggered by a data change. The calculate event is an obvious choice since it's triggered any time anything changes, any calculation script on any field will work for this. But you have to be careful for the same reason.
If the data is merged into the PDF external to Acrobat, then you need a document level script that sets the colors when the PDF is opened in Acrobat.