Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: incrediBILL
<Form ACTION="process.cfm" METHOD="post">
<Form ACTION="frm" METHOD="">
i can't seem to be able to make it work.
what i need it for is that i have a form, for people to fill out their address, and then the smaller form inside is just for the country and states/provinces. if the person selects USA as the country, then it lists the states in the next drop down. if they select canada, it lists the provinces in that drop down. i couldnt get it to work by placing the code in the inner form into the outer form, and i want it all submitted together.. so what can i do ? any help? thanks!!!
There are other ways you can do it. One way that I use, is to use two submit buttons.
Foo: <select name="bar"><options...>various options</select>
<input type=submit name="bar" value="bar">
<select name="foo"><options...>various options</select>
<input type=submit name="foo" value="foo">
If the user wants to do "foo", then the submit button value "foo" is transmited with the form, but not the "bar" value and vice versa.
Then your program that receives the values checks to see which submit button the user pressed and only uses the associate form values for that option.
You output a variable to each input value attribute. When the form loads initially there are no values so they deafault to whatever you have set up, or just come up blank. If you send values to itself it will load them into the appropriate boxes or make the changes to the select box.
I would use a switch case to handle all of the different possibilities for your select box.