The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Using custom fields in a hyperlink

Highlighted
Occasional Contributor

Using custom fields in a hyperlink

Hi all,

 

I've seen several posts pertaining to this question, but it seems like they are all either outdated solutions, or have answers linking to pages that no longer exist.

 

I just want to place a link in my email with custom field data included, e.g.

 

<a href="http://www.site.com/index.php?id=CUSTOM FIELD 1">link</a>

 

Is this doable?

2 REPLIES 2
Highlighted
Regular Advisor

Re: Using custom fields in a hyperlink

Hello,

 

Thanks for posting.  Our API allows XHTML emails, in addition to normal HTML emails.  XHTML emails allow you to include dynamic content, based on the individual it goes to.  A full how to use XHTML is in our advanced editor guide, located here:

 

http://img.constantcontact.com/docs/pdf/building-your-emails-with-the-advanced-editor-tool-constant-...

 

So you could instert <Property name="Subscriber.CustomField1"/> into a url to embed the custom field you wanted.  There is tighter validation with XHTML (specified in the guide), so you may need to make some additional changes as well.  I hope the information helps.

 

Andrew B.

API Support

Highlighted
Solution Provider

Re: Using custom fields in a hyperlink

Your idea is great in theory, but Constant Contact does not allow it.  I've tried every which way from Sunday to use a custom field inside of a link and it seems to be impossible. PLEASE PROVE ME WRONG. At first I thought the issue was related to using single and double quotes, but that appears to irrelevant. In order to create a hyperlynk you have to start with <a href="Then your link goes here">link text</a>  But in order to use a custom field you have to use something like: <Property name="SUBSCRIBER.ADDRESSLINE3"/> Which gives you the following code:

 

<a href='<Property name="SUBSCRIBER.ADDRESSLINE3"/>'>link text</a> (I switched the double quotes in the href out for single quotes so that the double quotes around the name would not cancel out the href and it still doesn't work.

 

It appears that Constant Contact cannot think of a scenario where you would ever want to link to a custom field, much less link an image to a custom field.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured