Integrating with my form

Hi all,

Using the following as a guide:

http://www.campaignmonitor.com/resources/entry/682/capturing-subscribers-from-an-existing-form/

I am trying to integrate a newsletter sign-up to my form, my form looks like this:

<form id="contact" method="post" action="http://www.blend-em.co.uk/t/y/s/ndiit/?cm-4841-4841=sample@test.com&name=Joe+Bloggs" enctype="multipart/form-data">       
       
<h3>Get in touch</h3>

<fieldset>

<h5>About you</h5>

<p>You can give us a call or fill out the following form and we will contact you right back.</p>

<form id="contact" method="post" action="http://myclient.thisapp.com/p/a/t/tos/?cm-4841-4841=sample@test.com&name=Joe+Bloggs" enctype="multipart/form-data">        

<p><label for="Name" id="NameL">Name: *</label>
<input id="Name" name="Name" class="required" type="text" /></p>

<p><label for="Email" id="EmailL">Email: *</label>

<input type="text" id="Email" name="Email" class="required" /></p>

<p><label for="Telephone">Telephone:</label>
<input id="Telephone" name="Telephone" class="validate-digits" type="text" /></p>

<p><label for="Company">Company:</label>
<input id="Company" name="Company" type="text" /></p>

<p><label for="Address">Address:</label>
<input id="Address" name="Address" type="text" /></p>

<p><label for="Postcode">Postcode:</label>
<input id="Postcode" name="Postcode" type="text" /></p>

<p><input type="checkbox" name="newsletter" id="newsletter" value="newsletter" /><label>Yes, put me on the list</label></p>

<p><input value="submit" name="submit" type="submit" class="contact_button" /></p>

What I am struggling with is passing the name and email data via the url (I currently just have demo data here), here is an extract from the guide on the CA site:


[italic]The important points to note are the question mark (?) to show the start of the variables, the ampersand (&) to seperate the values we’re passing in, and the plus sign (+) which should be used to replace any spaces in the name.

Of course, you’ll need to grab the name and address values (and anything else you want) from your existing form, and plug those in where we have sample@test.com for example.[/italic]

Can anyone help me, how do I pass the data from my form and place it in the url?

p.s. the url for the form submit has my own url in, I have simply replaced it with the sample from the CA site, I know that I need to place my own info here, as mentioned, just need help on taking the data from the input fields for the name and email.

Thanks

Mathew Mathew, 7 years ago

Hey Lee,

How you pass the data from your form really depends on what technology and scripting you are using . What is your original form, that you are trying to adapt?


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
leewilson78, 7 years ago

Hi Matt,

I am using PHP to submit the form, not sure if this helps or not.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098