Dropdown Menu 1 choice filter Menu 2 options

Home Forums Quform WordPress Dropdown Menu 1 choice filter Menu 2 options

This topic is: not resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16827
    movisart
    Participant

    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

    #16832
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #16853
    movisart
    Participant

    I 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.
    #16861
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #19364
    greenycath
    Participant

    Hi,
    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…

    #19366
    greenycath
    Participant

    Hell yes I finally did it!
    wrote a javascript with jQuery.ajax function and a php action (wp_ajax_) that collects DB values

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy