Duplicate a locked page and make it fillable
Hello,
I have a PDF form with 33 pages. I want it to work this way:
- Every time you fill in the fields of a page, you click on a button to lock that page, and then you move on to the next one.
- Sometimes, when you have a specific value entered on the text fields, you click on a button in order to duplicate the page that is already locked and re-enter the needed information. (The button duplicates the page and unlocks its text fields).
- A page can be duplicated as many times as needed, and everytime you need to be able to fill in the text fields.
By using Javascript, I was able to do all of the above, except of one thing: Once my page is duplicated (using a Template), I cannot predict the name of the new page, thus making it impossible for me to unlock the fields that were already locked on the Template.
I wanted to use a For Loop in order to do this, but I am not sure how to insert a variable in the instruction. I tried this but it did not work:
var k;
for (k = 0; k < 1000; k++)
{
this.getField("P"+k+".Page4.Text1").readonly = false;
}
Do you have any ideas on how to make it work properly?
Thank you.
