Created
July 3, 2014 12:18
-
-
Save willwright82/62f6aed6ffbd28cb9789 to your computer and use it in GitHub Desktop.
Multi Step Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="http://www.aweber.com/scripts/addlead.pl"> | |
<div id="form_part1"> | |
Name: <input name="name"> | |
Email: <input name="from"> | |
<button | |
onclick="openForm_part('form_part', 2)" | |
>Next »</button> | |
</div> | |
<div id="form_part2"> | |
Phone: <input name="phone"> | |
Skype: <input name="skype"> | |
IM: <input name="im"> | |
<button | |
onclick="openForm_part('form_part', 3)" | |
>Next »</button> | |
</div> | |
<div id="form_part3"> | |
Street: <input name="street"> | |
City: <input name="city"> | |
State: <input name="state"> | |
Zip: <input name="zip"> | |
<input type="submit" value="Subscribe"> | |
</div> | |
<script type="text/javascript"> | |
<!--// | |
function openForm_part(part_name, part_number) { | |
for (var p = null, i = 1; | |
p = document.getElementById(part_name+i); ++i) { | |
if (i == part_number) p.style.display = ""; | |
else p.style.display = "none"; | |
} | |
} | |
window.onload = function() { | |
openForm_part("form_part", 1); | |
} | |
//--> | |
</script> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment