We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

How to code a custom opt-in form


How to code a custom opt-in form

Hello all,


I am new to constant contact and have recently had a client who also uses CC ask me to link to their CC opt-in on the website i built them. Rather than make a simple bandge link, i'd like to make a form that where visitors can enter their email address and click "sign up" right on the site. How could i go about doing this? I do not have access to their CC account, but here is the link they sent.




Thanks in advance!



Hi Jason,


You could use the Formstack signup widget, which doesn't require coding yourself, but has fixed formatting.  That Formstack widget has to be generated within the Constant Contact account, so the person making it would need to be logged in.



The link you have always has to the person to another form to finish the signup process, which most website owners want to avoid since it directs the end user away from their site.


You could go the completely custom route, which does involve some coding.  You will need to obtain access to your user's Constant Contact or have them generate an access token (step 3) so that the form can authenticate when sending contacts into their account.  Linked is an example php script--download the php sdk if you'd like to use it as a starting point!


Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page