Home › Forums › Quform WordPress › Dropdown Menu 1 choice filter Menu 2 options
- This topic has 5 replies, 3 voices, and was last updated 7 years, 10 months ago by greenycath.
- AuthorPosts
- September 14, 2015 at 4:51 pm #16827movisartParticipant
Good afternoon,
I want to create dropdowns to enter the address by county, district and I need to choose county, the district dropdown filter only the districts concerning this county.
I need urgent help.
Thank you
September 14, 2015 at 5:59 pm #16832AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 15, 2015 at 4:26 pm #16853movisartParticipantI just did that and add some code in html element with that code, but the dropdown don’t assume this values i don’t know why…
<script> jQuery(document).ready(function ($) { $('.iphorm_1_7').change(function () { var value = $(this).val(); $otherDropdown = $('.iphorm_1_9'); if (value == 'Portugal') { $otherDropdown.val('Arouca,Espinho,Oliveira de Azeméis,Santa Maria da Feira,São João da Madeira,Vale de Cambra,Castelo de Paiva,Águeda,Albergaria-a-Velha,Anadia,Aveiro,Estarreja,Ílhavo,Murtosa,Oliveira do Bairro,Ovar,Sever do Vouga,Vagos,Mealhada')); } else if (value == 'España') { $otherDropdown.val('Holla'); } $.uniform.update(); }).change(); }); </script>
- This reply was modified 8 years, 7 months ago by movisart.
September 16, 2015 at 5:19 pm #16861AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 16, 2016 at 12:18 pm #19364greenycathParticipantHi,
I have a question in accordance to the previous post code:
how can populate ‘value’ and ‘source’ with MySql db values using php? Is it possible?I have two dynamic dropdowns: departments and doctors (that can be filtered by department name)
I use a hook to populate ‘departments’ dropdown, but I’m stuck to populate ‘doctors’ one…June 16, 2016 at 8:07 pm #19366greenycathParticipantHell yes I finally did it!
wrote a javascript with jQuery.ajax function and a php action (wp_ajax_) that collects DB values - AuthorPosts
- You must be logged in to reply to this topic.