Adding a Text Field to a Link in a Snippit

Is it possible, when creating a Link in a Snippit, to add a Text Field where the TextBlaze user can drop a URL? The way I'm hoping this would work is to have text like "Click here to fill out your survey" automatically update with the URL added by the User to the Text Field when configuring the Snippit. This is needed in cases where URL's are email specific, and not generalized or consistent links used across many emails. For example, the link to a user's specific project, or a specific cloud-storage folder.

For reference, I'm trying to do this by using the following:
"{Link: {Text field inserted here}}Click here to fill out your survey{endlink}

However, it doesn't appear to pull in the Text Field, and instead renders an error: "Invalid {link} URL: {formtext: name=URL; default=}". I think this is happening because the "Link" function is trying to fire before the user can fill in the text field, so the Link function doesn't see a URL, and throws an error.

Hi Joseph,

The best way to avoid this error is to have the text field outside of the link function, but have the variable associated with the text field inside the link function. In this example snippet, I put the text field in a note so you can change the link before inserting the snippet, but only the final link is inserted. Let me know if this works for you. Thanks!

{note}{formtext: name=link_text; default=https://www.google.com/}{endnote}

{link: {=link_text}}Survey{endlink}

1 Like

Thank you, @Alexander_Cornett - this works perfectly!