This question is similar to my previous question but not the same … please check out….I am using totaly 3 webpages; form elements are distributed among two pages, “eg1.html” and “eg2.html”, but all the form elements should be submitted to “eg.php”.
Here is the code for eg.php which accepts the form elements from both eg1.html and eg2.html:
$size=$_POST["fontsize"];
$label=$_POST["label"];
$age=$_POST["age"];
$sex =$_POST["sex"];
code for eg1.html
<html>
<body>
<form action="eg.php" method="post">
<input type="radio" name="fontsize" value="3"/>
<a href="eg2.html">click here to select other options which includes age and sex</a>
<input type="radio" name="label" value="stacks"/>
<input type="submit" name = "down" value = "down">
</form>
</body>
Now What would be the code for eg2.html? just check out sample partial html code :but needs to be compleated....
<input type="radio" name="age" value="3"/>
<input type="radio" name="sex" value="female"/>
The code should work exactly like this:
First user will open eg1.php he selects only one option that is “fontsize” .. next he clicks on the “link to eg2.html” to select two more options “age” and “sex” after selecting… he will be redirected back to eg1.php where he has to select one more option that is “label” … then he will submit the form to eg.php. Which will hold all form elements those are ‘fontsize’ ‘age’ ‘sex’ and ‘label’ …..
I have seen many website using this technique please check out cooltext.com where user will get an option to click on the font image which will redirect him to fonts page after selecting one of the fonts images he will be redirected back to homepage,where he can select some other form elements or form elements and finally submits the form …. i have also seen many websites using this technique , i think this can be done using JQUERY/JavaScript but not sure …please help me to fix this problem guyz,.,,,
Using js you can have the entire form on one page and divide it in steps like this
js: