Joomla 3. Dependent select in custom component

by Дмитрий Безруков   Last Updated September 11, 2019 08:10 AM

I make a component for Joomla 3. It has two lists "City" and "Place". How can I make the "Place" list update without reloading the page when I select "City"?

<field name="cityid"
type="sql"
class="cityid"
label="Выберите город"
description="Выберите город"
sql_select="e.*"
sql_from="#__lk_cities AS e"
sql_group="title"
sql_order="e.id ASC"
key_field="id"
value_field="title"
 filter="raw"
header="Выберите город"
/>

<field name="placecoolectionid"
type="sql"
label="Выберите место сбора"
description="Выберите сбора"
sql_select="e.*"
sql_from="#__lk_place_collections AS e"
sql_group="title"
sql_order="e.cityid ASC"
sql_filter="cityid"
key_field="id"
value_field="title"
required="true"
class="placecoolectionid"
header="Выберите место сбора"
showon="cityid!:0"
filter="raw"
/>

If you do not complicate, give a very detailed answer because I'm new to this



Related Questions


Updated July 20, 2017 07:10 AM

Updated October 25, 2016 09:04 AM

Updated May 18, 2015 21:04 PM

Updated June 15, 2018 13:10 PM

Updated March 01, 2016 04:04 AM