|
Posted by Manuel Lemos on 10/05/76 11:40
Hello,
on 02/18/2006 05:48 PM Mark Winter said the following:
> I am wondering if someone could point me in the right direction to
> figure out how to create a dynamic form. I have been developing
> programs in perl and oracle and have recently switched to php.
>
> I need to create a form that has four of five seperate pick list on it.
> Each item in each of the pick list depend on the users previous entry.
> For instence if the user picks Ford then Taurus, Ranger, Focus,.etc show
> up in the next pick list then the user picks Ranger and 2 wheel drive, 4
> wheel drive, etc show in the next pick list box on so on.
>
> I know how to this if the screen is refresed after each user entry. What
> I would like to fugure out how to make the screen automatically update
> each pick list and not refreshing the whole screen.
Take a look at this forms generation and validation class. It comes with
linked select plug-in class that does exactly what you want.
It lets you define select inputs with multiple groups of options that
are switched dynamically when the value of another input changes.
There is a static version of the plug-in that lets you define the
alternative groups as an array, and there are several variants of the
plug-in that picks the groups options from a database using different
API: MySQL or database independent with Metabase or PEAR::MDB2 API.
http://www.phpclasses.org/formsgeneration
Here is an example page:
http://www.phpclasses.org/browse/view/html/file/9879/name/test_linked_select_page.html
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
[Back to original message]
|