Jump to content

Dynamic Forms


korsohill
 Share

Recommended Posts

Hey guys, just wondering if it is possible to have multiple entries in a form change (namely some <select> lists) depending on what is chosen in a different <select> list. for example:<label>Hi</label><select><option>1</option><option>2</option></select><label>Hi 1</label><select><option>3</option><option>4</option></select><label>Hi 2</label><select><option>3</option><option>4</option></select>Depending on what is chosen in the first entry (1 or 2), either "Hi 1" or "Hi 2" will be shown later in the page. The other will not be there.Update (11:35):I am also wondering how you get webpage URLs such as http://www.example.com/index.php?=hello and such. How do these work? How do you make one?

Edited by korsohill
Link to comment
Share on other sites

You can do that with JavaScript - hide the other two lists when the page loads (e.g. display:none), then have an onchange handler for the first select (select.onchange = handler), and in the handler display one of the other lists depending on which value was selected.

I am also wondering how you get webpage URLs such as http://www.example.com/index.php?=hello and such. How do these work? How do you make one?
You use the querystring. http://www.php.net/manual/en/reserved.variables.get.php
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...