Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17964

    Hi,

    I build a custom product registration form and there are few drop down menus in the form. Whenever I add the dropdown menu it duplicates and user is unable to select one option. The problem is when I add dropdown menu theme itself add few span tags which duplicates dropdown menu

    I attached screenshot for the reference.

    xfpz4j.jpg

    Below span tags are the problem. How can I remove them only from these customized forms?

    Code:
    <span class=”avia_style_wrap”><span class=”avia_select_unify”><select id=”iphorm_27cf454061db728c089be789382aabdf250a7c0fba213a_12″ name=”iphorm_2_12″ class=”iphorm-element-select iphorm_2_12″ style=”opacity: 0;”>
    <option value=”Yugoslavia”>Yugoslavia</option>
    <option value=”Zambia”>Zambia</option>
    <option value=”Zimbabwe”>Zimbabwe</option>
    </select><span class=”avia_select_fake_val”>United Kingdom</span></span></span>

    #97679

    Hi,

    Try removing this part and see what happens

    <span class="avia_select_fake_val">United Kingdom</span>

    Regards,

    Ismael

    #97680

    Hi Ismael,

    Thanks for the reply but this doesn’t make much difference. Any other solution?

    Many thanks

    #97681

    I have just removed the function for the drop down menu and it works fine now.

    I am sharing below code for the users who are facing same problem.

    Go to:

    themefolder >> woocommerce-config >> woocommerce-mod.js

    Code:
    //improve layout of select dropdowns
    function avia_select_unify(select_el)
    {
    var selects = jQuery(select_el).not(‘#rating’);

    //unify select dropdowns
    selects.each(function()
    {
    var el = jQuery(this);

    if(el.css(‘display’) == ‘none’) return;

    //el.wrap(‘<span class=”avia_style_wrap” />’).wrap(‘<span class=”avia_select_unify” />’).after(‘<span class=”avia_select_fake_val”></span>’);
    //el.css(‘opacity’,0).next(‘.avia_select_fake_val’).text(el.find(‘option:selected’).text());

    el.bind(‘change’, function()
    {
    //el.next(‘.avia_select_fake_val’).text(el.find(‘option:selected’).text());
    });

    });
    }

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Duplicate drop down menu’ is closed to new replies.