Copy link to clipboard
Copied
I’ve tried to add a variation on a theme to my existing dynamic stamp which was working perfectly and requests the user to enter text for each form field that needs to be populated and then adds today's date successfully.
Now when I use the original stamp it asks me all the questions and those for the additional stamp.
When I use the stamp on page 3, it only places the stamp with no queries.
I think this is to do with the event.source.stampName definition in the javascript, I guess the second stamp has a different name but I don’t know how to find the new name if it has one?
var cAsk = "Enter Supplier";
var cTitle = "Supplier (PMI)";
if(event.source.forReal &&
(event.source.stampName == "#puSbQNir5_MOMXPXKxkHrC"))
{
var cMsg = app.response(cAsk, cTitle);
event.value = cMsg;
event.source.source.info.DocumentState = cMsg;
}
Ps) I copied the form fields from stamp one into stamp two and renamed them, could this be the issue, do I need to start from scratch?
Pps) Adobe automatically combined both stamps into one pdf stamp file which was not my desired result.
Thanks in advance Alex.
You can find out the internal stamp name by placing your stamp on a document. Then you bring up the JavaScript console. Now select your stamp and execute the following command in the JavaScript console:
this.selectedAnnots[0].AP
Both stamps in the same document is not a problem, but you can certainly save them in two different stamp files. If they should both be part of the same stamp category, it does make sense to save them in the same stamp file.
Copy link to clipboard
Copied
You can find out the internal stamp name by placing your stamp on a document. Then you bring up the JavaScript console. Now select your stamp and execute the following command in the JavaScript console:
this.selectedAnnots[0].AP
Both stamps in the same document is not a problem, but you can certainly save them in two different stamp files. If they should both be part of the same stamp category, it does make sense to save them in the same stamp file.
Copy link to clipboard
Copied
Thanks Mr.K, I've changed the event source in the custom script. and that's fixed the primary issue. I'll investigate more tomorrow and prove that it works in other scenarios.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now