I am having an issue with the custom fields. I am posting new contacts to constant contact using the API. Everytime I add a new contact, in the custom fields i have sections of a link broken apart, but when it hits the ending anchor tag, the greater than and less than signs are getting removed. I cannot figure out why.
If you can provide the request payload for the campaign that you're sending in, and the response payload with the altered content, we can see what type of formatting issue you're running into and give you guidance.
Its about 15 contacts that are being added to the list. In the custom fields I will give you what I have stored in the string variables that are being attached to each custom field.
const string customField7 = ",<a href=\"https://";
const string customField9 = ",.lbri.com\">";
string customField10 = ",.lbri.com</a>";
this is giving me grief, other than this everything looks great and works properly. I have also tried < and > but no matter what I do it removes "</" and ">" in the end anchor tag. I attached my main file containing most of my code.
I hav been looking into this and I believe that the issue you're having is related to the specific formatting of the custom fields. At this time there are two options to resolve this:
For the first option, we have added the ability to merge custom fields into custom code emails, and you can find a guide on how to do this here: http://developer.constantcontact.com/docs/developer-guides/custom-content.html
For the second option, the formatting of your custom fields would need to be adjusted. The standard format for this is:
CustomField7: <a href="http://www.yourdomain.com/link.html?mn=
CustomField9: ">Click Here</a>
And you would place another value that you want to merge between 7 and 9 in another variable. Due to the fact that there is some filtering of input on the custom fields to protect our databses, it is important to try and stick to this format as much as possible, or to simply use the method described in our new guide.
If you have any questions, please let me know!