I have a form to build flowable dynamic lesson plans for training. Each lesson plan form consists of multiple pages, some of the pages contain multiple subforms, several having dynamic table rows. I am attempting to place a single reset form button on the page to clear all field values and reset all table row instances to 1 by clicking a button on the form master page.
My Current XFA/javascript attempt is below;
LP.#pageSet[0].Pt1.sFrmPfHd.resetForm::click - (JavaScript, client)
xfa.host.resetData();
// xfa.host.remerge(); <- didn't work
// loop through table and delete rows
while (LP.Pg1.FlowContentPg1.rowSFrmTngMethodPick.tblData._rowSubform.count > 1)
{
LP.Pg1.FlowContentPg1.rowSFrmTngMethodPick.tblData._rowSubform.removeInstance(0);
}
while (LP.Pg1.FlowContentPg1.rowSFrmTngMethodsFree.tblData._rowSubform.count > 1)
{
LP.Pg1.FlowContentPg1.rowSFrmTngMethodsFree.tblData._rowSubform.removeInstance(0);
}
while (LP.Pg3.PgBody.rowSFrmTngMethodPick.tblData._rowSubform.count > 1)
{
LP.Pg3.PgBody.rowSFrmTngMethodPick.tblData._rowSubform.removeInstance(0);
}
while (LP.Pg3.PgBody.rowSFrmTngMethodsFree.tblData._rowSubform.count > 1)
{
LP.Pg3.PgBody.rowSFrmTngMethodsFree.tblData._rowSubform.removeInstance(0);
}
while (LP.Pg3.PgBody.rowSFrmLP.tblData._rowSubform.count > 1)
{
LP.Pg3.PgBody.rowSFrmLP.tblData._rowSubform.removeInstance(0);
}
I would attach the form but cannot seem to find that as an option. If you would like to see the actual form please email me.
mailto:toby.yadon@us.af.mil