Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

script to modify the text of a text object

Avatar

Level 5

Hello,

I am developing a form (XFA dynamic PDF) that can be translated by selecting the language.

When the language is selected, the form updates the caption of all fields with corresponding text in the selected language.

For that, I use the following script: oTarget.caption.value.resolveNode("#text").value = CaptionTranslation[i][Language];

CaptionTranslation is a 2-dimentional array listing all the objects that need to be translated, and for each object, the translation in every supported language.

This works for various types of objects, but not for text objects that do not have a caption property.

What should be the script to change the text of a text object?

 

Thank you in advance

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

Got it:  oTarget.value.resolveNode("#text").value = CaptionTranslation[i][Language];

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

Got it:  oTarget.value.resolveNode("#text").value = CaptionTranslation[i][Language];