• Resolved AdrianoAgri

    (@adrianoagri)


    Hi.
    I have realized a form with a selection of lists which users have to subscribe.
    The lists are the normal checkboxes input box list.
    So if there are two, three, four or even five list to choose from, it is all right, but if the list number is over 5 it is graphically unfriendly to use and to see.
    It is possible to use a dropdown menu instead of checkboxes to let the user choose the list to subscribe to?

    I hope to be clear in my request..

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • @adrianoagri your request was perfectly clear! The plugin itself does not provide this sort of option, but some other users already tried doing that via javascript, please check here: http://stackoverflow.com/questions/28765587/how-can-i-convert-checkboxes-into-dropdown-list

    Thread Starter AdrianoAgri

    (@adrianoagri)

    Hi. i have tried with the link you give me, but it doesn’t works..
    So i have deepen jquery methods and i have found a solution, but it works only with a normal html page, but doesn’t works with wordpress.
    i mean i have realized this code

    $(document).ready(function(){
    			var selname = $('.mailpoet_paragraph').find('input:checkbox').attr('name');  
    			var addselect = $("<select name='" + selname + "'></select>");    
    			$('form > p:eq(1)').after(addselect);  			
    			$('.mailpoet_checkbox_label').each(function(){
    			$('select').append('<option value="'+$(this).find(' > input').val() +'">'+$(this).text()+' </option>');  
    			});
    			
    			$('form > p:eq(1)').find('label').hide();
    			$('form > p:eq(1)').find('label:first').show();
    						
    		}); 

    and i have placed it into the header section of my theme, and still doesn’t works. i have found that with wordpress i am using noconflicts option, so i have changed every $ with jQuery but still doesn’t works.
    Could you help me again or give me some other hints?
    i really appeciate every kind of help… thanks

    Thread Starter AdrianoAgri

    (@adrianoagri)

    Ok! come back to my steps.. i have found the solution..
    i have placed the script into the footer after the jquery library was loaded..

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Form selection lists’ is closed to new replies.