barefootedboy Posted November 19, 2007 Share Posted November 19, 2007 Hi there , i wonder if someone can help or point me in the right direction (A tutorial or something ) I am a newbe and what i am trying to do is create a form that start off with a number of options (3) depending on what the user chooses this will lead them to another , more comprehensive form , i am trying to avoid having one long form that will put people off ... rather allowing them to to go directly to the form that is relevant to them , i have already created these forms i just need to know how to make the initial form ( the php for this ) I am as i said a novice so if somebody knows of a tutorial in this direction that would be great .. i am aware that there may be a very easy answer to this so please feel free to laugh at me should you feel the urge kind regards Sebastian Quote Link to comment Share on other sites More sharing options...
nuxy Posted November 19, 2007 Share Posted November 19, 2007 You could use a dropdown list and let the user select a choice, and then direct them to the specified page. <select> <option onclick="javascript:document.location = 'relavant_page1.php'">Option 1</option> <option onclick="javascript:document.location = 'relavant_page2.php'">Option 2</option> <option onclick="javascript:document.location = 'relavant_page3.php'">Option 3</option> </select> Edit: Something as javascript can be used to display the form on the same page. <script language="javascript"> function show(id,select) { document.getElementById(select).style.display = "none"; document.getElementById(id).style.display = "block"; } </script> <select id="select"> <option onclick="javascript:show('one','select')">Option 1</option> <option onclick="javascript:show('two','select')">Option 2</option> <option onclick="javascript:show('three','select')">Option 3</option> </select> <div id="one" style="display:none">Form One</div> <div id="two" style="display:none">Form Two</div> <div id="three" style="display:none">Form Three</div> Quote Link to comment Share on other sites More sharing options...
barefootedboy Posted November 19, 2007 Author Share Posted November 19, 2007 wow thanks for these options , i think i am going to try the first on as i already have the three forms on seperate pages these are html pages that will post onto a php page thanks very much for giving me this option kind regards barefootedboy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.