Using JavaScript to make a Dynamic Stamp Editable
- March 19, 2024
- 1 reply
- 1035 views
Hi there,
I'm developing a tool within adobe to help my accounting team with their specific coding process.
So far, I have a dynamic stamp template that will do the following:
I place the stamp > a dialog box appears > user inputs information into various text fields > assigns entered information to text fields. The stamp reflects what was input the dialog box once I click ok, however, I want to be able to access the previously input information the next time I try to stamp the same stamp (with the same template).
I notice that once I fill the stamp information out, the template stores the values I entered. However, when I try to stamp again, the dialog box reappears completely empty. I would like the dialog box to reappear with the previously entered values already IN the dialog. Is this possible?
That is - in the same document. Once I've placed the stamp once, I want to be able to reference the information that was previously entered. This is what happens:
The dialog box on the right created the stamp on the left

When I try to stamp again, this is what I see (matches the information previously entered):

I would love if once I try to stamp again - where the highlighted "###" would reflect "PO#1234" instead (as well as the rest of the fields with previous inputs).

If anyone has any insights, they would be very much appreciated. I've thought about a separate object (such as an array) outside of the stamp to then populate the fields, but am having a tough time wrapping my head around that currently.
Attached, please find the working code - there are some testing print commands I was trying to utilize in order to help me track where certain variables were.
Thanks so much,
