I am completely a novice at this, and borrowed part of a script from a sample online.
I am working a stamp with a dialogue box prompting for the date, and defaulting to the current date if no response. I have gotten it to display the dialogue box and the default date. But, the results don't end up on the stamp. Could someone please assist on resolving the issues?
if(event.source.forReal && (event.source.stampName == "#2Nw2jMn7S5l9QIPW-WGOHB"))
{
var rgEmpty = /^\s*$/;
var cDate = null;
var cDfltDate = null;
if((event.value != null) && !rgEmpty.test(event.value) && util.scand("mmm dd yyyy",event.value))
cDfltDate = event.value;
else
cDfltDate = util.printd("mmm dd yyyy",new Date());
while((cDate==null) || rgEmpty.test(cDate) || (null == util.scand("mmm dd yyyy",cDate)))
{
cDate = app.response({cQuestion:"Please Enter the Date",
cTitle:"Stamp Date Entry",
cDefault:cDfltDate ,
cLabel:"Date:"
});
if((cDate==null) || rgEmpty.test(cDate) || (null == util.scand("mmm dd yyyy",cDate)))
{
app.alert("Please enter date as \"mmm dd yyyy\"\n\nEx: Apr 15 2020",1);
if(cDate != null)
cDfltDate = cDate;
}
}
}
Also, I would like to distribute the final stamp to my coworkers as a template rather than them creating the script. Can I share the stamp pdf, and have them create one off my template without them having to modify the script?
Thank you!