This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 11 months, 2 weeks ago.

Select2 Multiple occurances on Page


  • rightcars
    Participant

    Member Reply #8608

    I am wanting to use the select2 country list dropdown on a page three times. I have it working perfectly with the exception that the country icons the flags only show on the first one

    Her eis the first 2 defined in app.js

    var handleSelect2 = function() {

    if (jQuery().select2) {

    $(‘.select2’).select2({

    placeholder: “Select”,

    allowClear: true

    });

    }

    }

    var handleSelect2me = function() {

    if (jQuery().select2me) {

    $(‘select.select2me’).select2me({

    placeholder: “Select”,

    allowClear: true

    });

    }

    }

    as you can see i added a second one select2me which made them both function on the page with the exception of the country icon flags

     

    Please advise what I am doing wrong

    Sean
    Sean
    Keymaster

    Posts: 4022
    Support Staff Reply #8788

    Hi,

    The Select2 country flag drop down list requires more specific setup so you should refer to “assets/scripts/login.js” scripts “handleRegister” function.  To use the country dropdown link please refer to login.html template.

    Thanks.

     

Tagged: 

You must be logged in to reply to this topic.