Who knows how to do THIS with an OPT-IN Form?

4 replies
I'm using an icontact opt-in form. (icontact.com)

People enter name, email, and choose a certain value from a drop down menu.

I would like to alter the code so the page they are redirected to (after opt-in) is different based on the value they choose. For some reason icontact told me they couldn't do this, but it doesn't seem so complex.



Here's the code

<form method=post action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3720" accept-charset="UTF-8" onsubmit="return verifyRequired3720();" >
<input type=hidden name=redirect value="www.LOCATION-AFTER-OPT-IN.com" />
<input type=hidden name=errorredirect value="www.LOCATION-AFTER-ERROR.com" />

<p class="a">
<label>NAME:</label>
<input type=text name="fields_fname">
</p>

<p class="b">
<label>EMAIL:</label>
<input type=text name="fields_email">
</p>

<p class="c">
<label>AMOUNT NEEDED:</label>
<select name="fields_lname">
<option></option>
<option value="5">$500</option>
<option value="6">$600</option>
<option value="7">$700</option>
<option value="8">$800</option>
<option value="9">$900</option>
<option value="10">$1000</option>
<option value="11">$1500</option>
<option value="12">$2000</option>
<option value="13">$2500</option>
<option value="14">$5000</option>

</select>
</p>
<input type=hidden name="listid" value="36210">
<input type=hidden name="specialid:36210" value="GNW1">

<input type=hidden name=clientid value="600030">
<input type=hidden name=formid value="3720">
<input type=hidden name=reallistid value="1">
<input type=hidden name=doubleopt value="0">

<p class="d">
<input type="submit" name="Submit" value="ENTER">
</p>

</form>
<script type="text/javascript">

var icpForm3720 = document.getElementById('icpsignup3720');

if (document.location.protocol === "https:")

icpForm3720.action = "https://app.icontact.com/icp/signup.php";
function verifyRequired3720() {
if (icpForm3720["fields_email"].value == "") {
icpForm3720["fields_email"].focus();
alert("The Email Address field is required.");
return false;
}


return true;
}
</script><BR>



so somehow, I need this to be something like:


If option 5, redirect them _______________
if option 6, redirect them ________________


this way I can customize where people go after opt-in, based on their choice.

Thanks in advance If anyone can throw me a bone!

CW
#form #optin
  • Profile picture of the author SteveJohnson
    you're going to have to do it with Javascript, setting the value on form submit. Sorry, I'm not enough of a js person to tell you exactly how to do it.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[2605209].message }}
  • Profile picture of the author mywebwork
    Actually you could do it with HTML or JavaScript - personally I'd use JavaScript as I like building AJAX-type designs.

    Either way, you POST your form to a dynamic page, I'd use PHP but there are other technologies that will work as well. On that page you read the value of the "fields_lname" variable (assuming you name your option box the same as in your sample code) , evaluate it and direct them (in PHP use the Header command) to the correct page.

    Bill
    {{ DiscussionBoard.errors[2605336].message }}
    • Profile picture of the author kevinfurtadoos5
      Why don't you try to use Javascript. You can easily set up the form and even submit it. But, I do not know the exact process.
      {{ DiscussionBoard.errors[2655758].message }}
      • Profile picture of the author Tim Brownlaw
        Check to see if icontact allows you to post data back to your thankyou page.

        This should be a setting in your campaign setup.

        If it does, you should be able to add in a new field and then once the form is submitted and processed by Icontact, then it'll post the fields back to your thankyou page where you can process it.

        It is a feature commonly used to send back info like Firstname and email address so you can personalize your thankyou page and explain that they'll be getting an email with a verification link...

        So if you can add the extra field, use it to determine what is displayed on the page or have it redirect to another page...

        Aint programming a load of fun, you've just got figure out what you want it to do!

        If I get excited enough I'll write up a guide , but it'll be using getresponse but the theory will be applicable to any AR that supports such a feature.

        Cheers
        Tim
        Signature

        Great Success is built from many little successes!

        http://www.timbrownlaw.com - My Wee Part of the World.

        http://www.LookingOverMyShoulder.com

        {{ DiscussionBoard.errors[2660860].message }}

Trending Topics