Using custom fields in a hyperlink


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=" FIELD 1">link</a>


Is this doable?




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:


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

Occasional Participant

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