Using the following as a guide:
I am trying to integrate a newsletter sign-up to my form, my form looks like this:
<form id="contact" method="post" action="http://firstname.lastname@example.org&name=Joe+Bloggs" enctype="multipart/form-data">
<h3>Get in touch</h3>
<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://email@example.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 firstname.lastname@example.org 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.
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?
I am using PHP to submit the form, not sure if this helps or not.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free