Leiste mit Community-Erfolgen erweitern.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
GELÖST

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 Akzeptierte Lösung

Avatar

Korrekte Antwort von
Level 5

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

Lösung in ursprünglichem Beitrag anzeigen

1 Antwort

Avatar

Korrekte Antwort von
Level 5

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