• I have a select field in CF7:

    <label>Options[select* options]</label>

    I have a ton of options that will change in the future, so I populate the select options dynamically with jQuery.

    jQuery.each(options, function (val, text, index) {
    jQuery(‘select[name=”options”]’).append(jQuery(‘<option> .
    </option>’).val(val).html(text.options))
    });
    When I come to send the mail, CF7 is rightly just echoing the index of the option selected, rather than the text, but this is not what I need.

    [options]

    Can I get more info out of that simple options shortcode? I don’t want to use the Listo plugin but I’m happy to add custom functions if I need to.

  • The topic ‘Get the text value of a dynamically populated select field’ is closed to new replies.