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.

Simple Form Post Action

Highlighted
New Member

Simple Form Post Action

Hello there,


I have a simple form on a shopify website that allows a user to enter his name and email and press a button to subscribe to a newsletter.  You can see the form at www.riderloot.com at the bottom of the page.  It works great using MailChimp right now with the following HTML:


<form

method="post"

action="http://riderloot.us1.list-manage1.com/subscribe/post?u=c765a9cda64d315d11231c5cc&amp;id=ba4f5613b9">

<label for="name">Subscribe to our newsletter</label>

<input type="text" value="Name..." name="NAME" id="name"/>

<input type="text" value="Email Address..." name="EMAIL" id="email"/>

<input type="image" src="subscribe.png" alt="Subscribe" />

</form>


All I want to do is replace the post action URL with a Constant Contact URL.  Is this possible?  I tried using the "Join Mailing List" wizard but it seems to be spitting out the same hidden 'm' and 'p' values regardless of the list i'm using.


Thanks,


Brandon


 

2 REPLIES 2
Highlighted
Employee

Re: Using our SiteVisitor API's

Hello Brandon,



What you are asking for is currently possible using our SiteVisitor API.  I do need to explain though that our SiteVisitor API is deprecated, and will not work at a later date.



However, currently this will work for what you are looking for:



<form method="POST" action="http://ui.constantcontact.com/roving/wdk/API_AddSiteVisitor.jsp?loginName=(LOGINNAME)&loginPassword=(PASSWORD)&ic=(LIST GOES HERE)">

<label for="name">Subscribe to our newsletter</label>

<input type="text" value="Name..." name="first_name" id="first_name"/>

<input type="text" value="Email Address..." name="ea" id="ea"/>

<input type="image" src="subscribe.png" alt="Subscribe" />

</form>



We suggest that you do begin to use our REST API's, which you can learn more about here. You would not be able to use the REST API's with just using an HTML form, it does require a web scripting language, such as PHP or ASP.NET, to perform a POST to our URI's with the contacts information.



If you have any questions about currently using the SiteVisitor API, or if you have questions about moving to REST API, please feel free to ask them here.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Employee

Re: Using our SiteVisitor API's

I did want to mention that you could also use the Constant Contact Signup Form Generator (CCSFG). This is a php utility that once uploaded to your web sever, will allow you to build a custom HTML form with whatever fields you choose and submitting to whichever lists you select. Once the HTML is generated from this application, you can simply copy/paste this on to your webpage and it will submit contacts to Constant Contact. This is certainly your choice if you'd like to use this or not but I wanted to give you the option.

David J

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