Increment multiple numeric fields
i'm brand new adobe xi pro , i'm modifying existing document received colleague. i'm trying is:
i have 7 number fields named f1 .. f2.
i want enter number in 1 of these 7 fields , fields after field integer entered each increment entered value 1
e.g. user enters 1 f4,
f5 = f4 + 1,
f6 = f5 + 1,
f7 = f6 + 1
any suggestions on how achieve appreciated. thanks.
you wrote f1-f2, assume mean f1-f7...
you can apply function doc-level script , call custom validation event of each of fields:
function incrementfollowingfields() { if (event.value=="") return; var fieldnumber = number(event.target.name.replace("f","")); var counter = 1; (var i=fieldnumber+1; i<=7; i++) { this.getfield("f"+i).value = (number(event.value))+counter; counter++; } }
More discussions in PDF Forms
adobe
Comments
Post a Comment