Hi,
I am doing a dropdown list using conditional fields but there are some problems I don't know how to do?
Currently I have to make the number of conditional lines equal to the number of counties I have.
Is there any method for me to update the value in custom_field when I change the value of city?
Can you help me, please?
I am doing a dropdown list using conditional fields but there are some problems I don't know how to do?
Currently I have to make the number of conditional lines equal to the number of counties I have.
Is there any method for me to update the value in custom_field when I change the value of city?
Can you help me, please?
- Code: Select all
<cms:editable
type='dropdown'
name='my_city_region'
label='Select City'
opt_values=
"Chọn tỉnh/thành phố=-|<cms:pages masterpage='the-city.php'><cms:show k_page_title />=<cms:show k_page_name/>|</cms:pages>"
required='1'
/>
<cms:func _into='my_city' my_city_region=''>
<cms:if my_city_region='ho-chi-minh'>show<cms:else />hide</cms:if>
</cms:func>
<cms:editable name="ditrict"
label="Quận/Huyền"
opt_values=
"Chọn quận/huyện=-|<cms:pages masterpage='the-district.php' custom_field="take=ho-chi-minh"><cms:show k_page_title />=<cms:show k_page_name/>|</cms:pages>"
type='dropdown'
not_active=my_city
/>
<cms:func _into='my_city' my_city_region=''>
<cms:if my_city_region='long-an'>show<cms:else />hide</cms:if>
</cms:func>
<cms:editable name="ditrict"
label="Quận/Huyền"
opt_values=
"Chọn quận/huyện=-|<cms:pages masterpage='the-district.php' custom_field="take=long-an"><cms:show k_page_title />=<cms:show k_page_name/>|</cms:pages>"
type='dropdown'
not_active=my_city
/>
<cms:func _into='my_city' my_city_region=''>
<cms:if my_city_region='dong-nai'>show<cms:else />hide</cms:if>
</cms:func>
<cms:editable name="ditrict"
label="Quận/Huyền"
opt_values=
"Chọn quận/huyện=-|<cms:pages masterpage='the-district.php' custom_field="take=dong-nai"><cms:show k_page_title />=<cms:show k_page_name/>|</cms:pages>"
type='dropdown'
not_active=my_city
/>