Hi..newbie to the forums as well as javascript in a pdf. I have a pdf with some very specific functionality...One of the pages has a form, with 10 different rows of data that each have their own reset button per line (illustrated below). In addition to that, this same page has a button which is supposed to duplicate this same form page again (with different fieldnames) so the user can enter an additional 10 lines of data, then click that same button to spawn yet another new page if needed, and so on and so on. As shown, each row consists of 7 input boxes, then a 4 option radio button set, then 2 more inputs, then another 6 option radio set. As if that wasn't enough, each of the individual radio button COLUMNS, and the last 2 input field COLUMNS, get tallied and totaled at the bottom, and those 'total' numbers each have to also be carried through (no matter how many of these pages the user spawns), and that total total has to appear on yet ANOTHER page of the file in a 'total total total' summary field. So, I'm good with spawning the new pages, but my problem at the moment is trying to get the individual reset buttons to only reset their own rows, and only on their own pages. I haven't even gotten to dealing with the totaling issue yet. I've tried to keep the field names small and consistent (ie the names in the 1st row are 1a, 1b, 1c, etc through 1k). Any help would be greatly appreciated!
My spawn new page button js so far is:
var SpawnPage = this.getTemplate({cName: "Template1"});
SpawnPage.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});
SpawnPage.setFocus(pageNum++);
and I've tried various unsuccessful variations for the resets js so I'm turning to experts:)