Hi Everyone,
Just a quick question regarding dropdown lists, is it possible, without the use of Javascript and just PHP, to have text fields/dropdown lists, etc. in a form, to be populated based on changing the value of another dropdown list and if so, would someone be kind enough to explain how or point me to information that would show me?
Thanks,
Chuck
Dropdown List populated based on the contents of another
Moderator: General Moderators
Re: Dropdown List populated based on the contents of another
Yes, but the form would have to be submitted back to the server each time a selection is made.
Re: Dropdown List populated based on the contents of another
Thanks for the quick reply McInfo,
Would you be able to point me to information such as code examples or a tutorial?
Thanks,
Chuck
Would you be able to point me to information such as code examples or a tutorial?
Thanks,
Chuck
Re: Dropdown List populated based on the contents of another
Basically, it involves using conditional statements to build the form based on what inputs have been received.
I don't know of any specific examples/tutorials, but I'm sure a search engine does.
I don't know of any specific examples/tutorials, but I'm sure a search engine does.
Re: Dropdown List populated based on the contents of another
I think its not easy to do this without javascript or ajax so dont waste your time its just a wastage of time
Re: Dropdown List populated based on the contents of another
I don't think it's a waste of time to support users who disable JavaScript.
- angelicodin
- Forum Commoner
- Posts: 81
- Joined: Fri Nov 13, 2009 3:17 am
- Location: Oregon, USA
Re: Dropdown List populated based on the contents of another
I'm sure you could use some kind of dynamic xml with php to do some conditional changes with the onChange. ~shrugs~ personally I use java for these types of things but it would be interesting to find out how to get around using java. Like McInfo said, be good for people who don't use java on their browsers.
~following~
~following~
Re: Dropdown List populated based on the contents of another
You mean JavaScript? (JavaScript is not Java.)angelicodin wrote:I use java for these types of things