CHANGING COLOUR OF TEXT BOXES

New Here ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

I have approximately 40 text boxes in one file that need to be changed from black to red.  Is it possible to automate this process, for example a repeat function?  

TOPICS
Edit and convert PDFs

Views

52

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

Hi,

 


for (var i =0; i < this.numFields; i++){
  var curField = this.getField ( this.getNthFieldName(i));
  if ( curField.type == "text"){
    curField.fillColor = color.red;
  }
}

The code above should do the trick, although I wrote it from the hip so have not been able to test it, if it is a one time thing you can run it from the console.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

LATEST

Are this form text fields?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines