Trying to get my arms around Scripting in Drafts


#1

I have a two step action. The first step is a prompt with a text input and a key of “prompt”. No real changes from the default.

In the second script step I have the line:

var who = draft.getTag("prompt_text");

which is causing errors. I’ve commented every other line out so I know this is the one causing the error, but I can’t for the life of me see what’s wrong. What am I missing?

Thanks


#2

I think you want setTemplateTag and getTemplateTag.


#3

That was indeed it, thanks. Working now.