I have a dynamic form initially designed in LiveCycle then updated in AEM manager. It has a section of dynamically added rows, and a user selected Dropdown for how many signature lines to include at the bottom of the table. The signatures are hidden subforms and it works when the user changes the number on the dropdown.
However when I import data no code following the importdata seems to execute. is there an easy way to read a value populated from the import and run a script to change the subform visibility without adding a second command button?
AFFM2519.#pageSet[0].Page1.sfrmBtnPgTop.btnXMLImport::click - (JavaScript, client)
xfa.host.importData();
xfa.form.recalculate(true);
I have tried adding a form level event in ready:form
AFFM2519::ready:form - (JavaScript, client)
Signers.fShowSign()
Made a Signers module with the below function.
function fShowSign()
{
var oldValue = AFFM2519.chkLstData.cboSigner.boundItem(xfa.event.prevText);
var newValue = AFFM2519.chkLstData.cboSigner.boundItem(xfa.event.newText);
// For DEBUGGING purposes
// xfa.host.messageBox(oldValue + " --> " +newValue ,"Signers Selected", 2, 2);
// show the appropriate subform
switch (newValue) {
case "0":
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign1").presence= "hidden";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign2").presence= "hidden";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign3").presence= "hidden";
break;
case "3":
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign1").presence= "visible";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign2").presence= "visible";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign3").presence= "visible";
break;
case "2":
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign1").presence= "visible";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign2").presence= "visible";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign3").presence= "hidden";
break;
case "1":
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign1").presence= "visible";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign2").presence= "hidden";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign3").presence= "hidden";
break;
default:
// hide all
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign1").presence= "hidden";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign2").presence= "hidden";
xfa.resolveNode("AFFM2519.chkLstData.sfrmSign3").presence= "hidden";
break;
}
}