Hi. I am trying to automate a document (medical history) where I have a text field ("Combined allergies" ) where its value (text) is derived from several other fields (individual alllergies). I need this value to be automatically copied either to a new bookmark, or to a previous, fixed, bookmark, and if possible in red fonts (so as to alert me of patient's allergies). Is this possible? Thanks.
Depends. Will you be using the file only in Adobe Acrobat? If so, then yes (although you'll need to provide some more information about whether you want it to create a new bookmark or edit an existing one, and which one). It will not work if used in the free Reader, though.
Here's an example code that sets the text of the first bookmark in the file to the field's value each time it changes, to be used at the end of the field's custom calculation script:
this.bookmarkRoot.children.name = event.value;
It assumes the bookmark already exists. The red text color can be applied manually.