Expand my Community achievements bar.

Change form caption value base on drop down


Former Community Member

I am working on a form with multiple languages (e.g. English + Chinese). What is the best way to change the caption when user select the Language Dropdown?

I have tried to use Javascript to setup the caption value on exit event, however, it seems the script not able to support a double byte character (chinese).

Is there a way can be done with binding xml data (UTF-8)? can any one share with me about the format of the xml and how to create the binding?

1 Reply


Level 10


I haven't had any trouble using chinese and arabic in the JavaScript, have you been able to change the caption value at all (using english characters)?

I do have a sample of changing a forms properties based on a language selected in a drop down list.  But this one stores all the language values in an XML file and binds the captions, error messages, tooltips, display patterns, etc using the <setProperty> command.  For a caption and some error messages you can set this in the Designer UI but for others you need to add them to the XML Source of the form directly.  It is easy enough once you see the pattern.

After all the <setProperty> commands are added the only code you need is an "xfa.form.remerge();"  in the exit event of the language selection drop down list.

The sample (the .pdf file) is https://workspaces.acrobat.com/?d=Uf6QlaBmAVIWishEOAK6og

The form template (the .xdp file) is https://workspaces.acrobat.com/?d=UjE*sH0UWbI6lRqbVgJBWA

The sample XML is https://workspaces.acrobat.com/?d=dYOIrRjOWWSqQLcGrmNVvg

Hope it helps