Hey all!
I´d like to know how to add a name/status to a dynamic stamp using javascript.
Using another pdf program I used the script below so that a pop up box appears once you placed your stamp and you manually enter your name and the status of the document being reviewed.
var cAsk = "Status: Approved, Rejected, or In Process";
var cTitle = "Document State For Stamp";
if(event.source.forReal &&
(event.source.stampName == "#stamp1"))
{
event.value = app.response(cAsk, cTitle);
}
-------------------------------------------------------------------------------------
var cAsk = "Enter a name";
var cTitle = "Document State For Stamp";
if(event.source.forReal &&
(event.source.stampName == "#stamp1"))
{
event.value = app.response(cAsk, cTitle);
}
I have resolved the name/identity part using this script: (but prefer to do this manually)
if((identity.name != null) && !/^\s*$/.test(identity.name))
event.value = identity.name;
else
event.value = identity.name.replace(/\./g," ").replace(/\./g," ").replace(/\b(\w)/g,function(Word,cFst){return cFst.toUpperCase()});
What would be the best way forward?
Thanks in advance!
How to add name/status text form to stamp
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- TrackerSupp-Daniel
- Site Admin
- Posts: 8544
- Joined: Wed Jan 03, 2018 6:52 pm
Re: How to add name/status text form to stamp
Hello Melfnaus,
From what I can see, this JS works correctly in our application as is, you simply need to create a stamp with a form field to contain it, then input the new stampName. This article should help:
https://www.pdf-xchange.com/knowle ... p-Creation
Kind regards,
From what I can see, this JS works correctly in our application as is, you simply need to create a stamp with a form field to contain it, then input the new stampName. This article should help:
https://www.pdf-xchange.com/knowle ... p-Creation
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: How to add name/status text form to stamp
Thanks for testing it out!
I had a look at the link that you sent and I can't seem to find the Stamp Id in properties.
Please refer to the snip below with what appears when I select the stamp
I had a look at the link that you sent and I can't seem to find the Stamp Id in properties.
Please refer to the snip below with what appears when I select the stamp
- Tracker Supp-Stefan
- Site Admin
- Posts: 17889
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: How to add name/status text form to stamp
Hello melfnaus,
Please make sure you are using the latest Editor build, and that you are adding the stamp from a stamp collection and not e.g. through JS code executed in the JS console - and you should see the Stamp ID there: Regards,
Stefan
Please make sure you are using the latest Editor build, and that you are adding the stamp from a stamp collection and not e.g. through JS code executed in the JS console - and you should see the Stamp ID there: Regards,
Stefan