I have a form where radiobutton selections change the font in several textfields. It works perfectly when filling out the form. When the form is submitted, I want those textfields to retain the font formatting that was selected by the user.
What I get instead - the radio button shows up selected but the fields show up in the default font. I have to actually click on the button again to get the correct font to display -that won't work for what I am trying to do. It appears that happens because the script runs in a click event. I have tried it in other events, but to no avail. Any help would be appreciated.
Here is the javascript for one of the radio buttons.
form1.#subform[0].#subform[1].RadioButtonList.#field[0]::click - (JavaScript, client)
xfa.resolveNode("ReturnAddress[0]").font.typeface = "Angelina";
xfa.resolveNode("ReturnAddress[0]").font.size = "14pt";
xfa.resolveNode("ReturnAddress[0]").para.lineHeight = "12pt";
xfa.resolveNode("Recipeintaddress[0]").font.typeface = "Angelina";
xfa.resolveNode("Recipeintaddress[0]").font.size = "14pt";
xfa.resolveNode("Recipeintaddress[0]").para.lineHeight = "12pt";
xfa.resolveNode("Note[0]").font.typeface = "Angelina";
xfa.resolveNode("Note[0]").font.size = "14pt";
xfa.resolveNode("Note[0]").para.lineHeight = "12pt";
xfa.resolveNode("#subform[6].ReturnAddress[1]").font.typeface = "Angelina"
xfa.resolveNode("#subform[6].ReturnAddress[1]").font.size = "22pt"
xfa.resolveNode("#subform[6].ReturnAddress[1]").para.lineHeight = "20pt"
xfa.resolveNode("#subform[6].Recipeintaddress[1]").font.typeface = "Angelina"
xfa.resolveNode("#subform[6].Recipeintaddress[1]").font.size = "22pt"
xfa.resolveNode("#subform[6].Recipeintaddress[1]").para.lineHeight = "20pt"
xfa.resolveNode("#subform[8].Note[1]").font.typeface = "Angelina"
xfa.resolveNode("#subform[8].Note[1]").font.size = "22pt"
xfa.resolveNode("#subform[8].Note[1]").para.lineHeight = "20pt"
Views
Replies
Total Likes
Check in Form Properties->Defaults under Scripting that you have "Preserve scripting changes to form when saved" set to Automatically.
Views
Replies
Total Likes
If that does not work you can check the status of the button when the form loads and set the fonts accordingly.
Paul
Views
Replies
Total Likes
That worked!!!
Thank you.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies