Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Dynamically populated won't submit selected value

  • I want to list all my WordPress multi-sites in a dropdown.
    At the moment, I achieve this by creating a JavaScript array and populating a blank <select class="subsites"> on window.ready.

    However, when I submit my form the values are not submitted.
    Hardcoded values are submitted.

    It seems the selected attribute is being ignored, not not even created!
    Any ideas?

    This is how I’m building my dropdown menu:

    var subsites=["One", "Two", "Three"];
    
    for (i=0;i<subsites.length;i++){
       var option = "<option value='"+subsites[i]+"'>"+subsites[i]+"</option>";
            $('.subsites').append(option);
    }

    http://wordpress.org/extend/plugins/contact-form-7/

  • The topic ‘[Plugin: Contact Form 7] Dynamically populated won't submit selected value’ is closed to new replies.