The last week I’ve completed the development of the cvLinkSelect class. I’ve added the option to disable the select elements that are not active because the previous values are not set. This is great feedback for the user!
Check the updated page for the cvLinkSelect class!
I’m searching for a easy way to style the select elements to a custum layout just like the Select Box Factory or something like that. Also I’m going to figure out if this class is usefull with a multiple select box. Anyway, I’m finished with this for the moment!
I’m very happy that a lot of developers have found my cvLinkSelect class and found it useful. cvLinkSelect is a simple Mootools 1.2 class that links form select elements based on the previous value via JSON requests. The php part was very basic though and a visitor pointed me to write the php part better, shorter and more functional. And here we are, just a simple 10 line php function.
In most cases you’ll get the data from a SQL database or something like that and in therefore it’s an array.
/* $arr = array from the database */
$arr = array(//array(id,name),
array(15,'15 inch'),
array(17,'17 inch'),
array(19,'19 inch')
);
Continue Reading »
I’ve updated the cvLinkSelect class. Some minor tweaks are added so you can control even more with the class. I hope you like it!
Changes
- Maintain an empty element with a short discription and an empty value in your html page and the class will not remove this one while you change the parent select box
- Set the value of the first select box to the empty option after page reload
- Comments added for developers and curious people
- Updated the example
- Removed some overhead in the class
Go the the original page of the cvLinkSelect class!