After Clicking Command Button, User Cannot Edit Form
This form has a command button on Page 5 that duplicates the page: http://pardons.delaware.gov/pdfs/pard_app.pdf
If the user executes this command button, and then closes and re-opens the form, the user is no longer able to add or edit anything in the form. Instead, the user gets an error message, which says “This document enabled extended features in Adobe Acrobat Reader DC. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document.” Is there a way to fix this problem? Thanks.
FYI, the JavaScript for the command button is as follows:
var fld;
var arrayFields = new Array(this.numFields);
with (this) { // default object is 'this'
//for (var k = numFields; k; k--) {
for (var k=0; k<numFields; k++) {
fld = getField(getNthFieldName(k));
if (fld.name == 'txtCrimSumOff_Cnt') {
if (fld.value == 1){
fld.value=this.pageNum+1;
}else{
fld.value=fld.value+1;
}
var page_start=fld.value;
}
}
}
//spawn from named template
var t = this.templates
var strName='CrimSumOff';
for ( var i=0; i < t.length; i++){
if(t.name.indexOf(strName)!=-1){
var myPage=t.spawn(page_start, true, false); //set second opt to false to preserve filenames
// Get the field name prefix that Acrobat automatically adds to the new fields
var f_prefix = "P" + (page_start) + '.'+strName + '1';
// Reset the newly created fields
this.resetForm([f_prefix]);
// Go to the new page
this.pageNum = page_start;
}
}