- Create a Stamp from PDF, name it and ensure you save it into the Dymanic Subfolder
- Stamp the stamp --> select it and press CTRL+J (Opens JavaScript debugger)
- Paste this.selectedAnnots[0].AP into console and CTRL+ENTER - Should return a name such as: #IIfBcQJ9RTIF_4ypJb0tBD
- Find the Stamp (%appdata%) then head to Adobe --> Acrobat --> DC (may be different depending on version) Stamps and find the latest file created
- Open the file, scroll to page 2 (usually, unless you have more than one stamp)
- Click Prepare Form
- Go to Calculate Tab --> Custom Calculation script and paste:
var cAsk = "Have the Goods Been Received / Services Satisfactory? (Initial)";
var cTitle = "GoodsRec/ServicesSat";
if(event.source.forReal &&
(event.source.stampName == "#IIfBcQJ9RTIF_4ypJb0tBD"))
{
var cMsg = app.response(cAsk, cTitle);
event.value = cMsg;
}
- Change var CASK and cTitle to reflect the field details
- Change event.source.stampName to the name you got in point 3
- If you need a date enter: event.value = util.printd("dd mmmm yyyy", new Date());
- Save the file back to where Point 4 was (C:\Users\mit\AppData\Roaming\Adobe\Acrobat\DC\Stamps)
- Change the order of the Javascript Prompt by preparing form --> More --> Set Field Calculation Order