I have been trying to get this to work. It is based upon on an example from radzmar's blog, which is really a good source of infomation.
For what ever reason when I call the function by selecting the appllicable language from the dropdown
if(xfa.event.newText == "English")
{
xfa.form.form1.FormLanguages.EnglishCaption();
}
if(xfa.event.newText == Deutsch")
{
xfa.form.form1.FormLanguages.DeutschCaption();
}
etc.....
the only Title(Text) that changes is Title6 (L03), with Title1 & Title5 there is no change, and if I add more Titles it stops working altogether.
Am I missing something? Any help would be appricated.
On the actual form (2 Pages) there are 150 Titles(Text Fields).
// Define the form objects, you would like to change the language for.
function ChangeFormLanguage(L01, L02, L03)
{
xfa.form.form1.Page1.Title1.rawValue = L01;
xfa.form.form1.Page1.Title5.rawValue = L02;
xfa.form.form1.Page1.Title6.rawValue = L03;
}
// This function assigns the new values for "English" to the object defined in the function "ChangeFormLanguage".
function EnglishCaption()
{
FormLanguages.ChangeFormLanguage( "WELDING PROCEDURE SPECIFICATION (WPS)",
"Welding Procedure WPS-N°:",
"EN");
}
// This function assigns the new values for "Deutsch" to the object defined in the function "ChangeFormLanguage".
function DeutschCaption()
{
FormLanguages.ChangeFormLanguage( "SCHWEIßANWEISUNG (WPS)",
"Schweißanweisung (WPS) N°:",
"DE");
}
// This function assigns the new values for "Italiano" to the object defined in the function "ChangeFormLanguage".
function ItalianCaption()
{
FormLanguages.ChangeFormLanguage( "SPECIFICA PROCEDIMENTO di SALDATURA (WPS)",
"WPS N°:",
"IT");
}
do you get any errors in the console when you use the fom in Acrobat?
And, do you really want to change the rawValue or the captions of the form fields?
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs