Chained Selects lets you "chain" multiple select lists together so that the selection in a "parent" list can tailor the options available in a "child" list. Chained Selects supports unlimited unlimited number of "chains" in in a form.
In order to Create a chain select list you have to use the SQL Form Field and the fields will be loaded using AJAX JSON Calls.
The first option of a Chain select list can also be a Radio list.
SQLs used in this tutorial for Joomla 1.6+:
Setting up the State:
SELECT state_name AS text, state_id AS value
FROM #__vm_state
WHERE country_id = '{selectresult}';
Setting up the Country:
SELECT country_name AS text, country_id AS value
FROM #__vm_country
WHERE 1;
Field You Prefer:
SELECT DISTINCT type AS text, type AS value
FROM #__ce_cv
WHERE published=1
ORDER BY type ASC
Field Select:
SELECT name AS text, value
FROM #__ce_cv
WHERE published=1 AND type='{selectresult}'
ORDER BY text ASC
SQLs used in this tutorial for Joomla 1.5:
Field You Prefer:
SELECT DISTINCT type AS text, type AS value
FROM #__contact_enhanced_cv
WHERE published=1
ORDER BY type ASC
Field Select:
SELECT text, value
FROM #__contact_enhanced_cv
WHERE published=1 AND type='{selectresult}'
ORDER BY text ASC
Recommend to a friend
Copyright © 2018 IdealExtensions.com. All Rights Reserved.