• hi guys,

    i’ve inserted a custom php generated dropdown by shortcode in functions.php:

    function reisedropdown(){
    	$output = "<span class='wpcf7-form-control-wrap reise'><select name='reise' class='wpcf7-form-control wpcf7-select wpcf7-validates-as-required' aria-required='true'><option value=\"\">-</option>";
    	$output.=  Reise("Alle_Reisen","Anmeldung_dropdown");
    	$output .= "</select></span>";
    return $output;
    }
    
    wpcf7_add_form_tag('reisedropdown', 'reisedropdown', true);

    output through form working like charm

    <label>Reise*</label>[reisedropdown]

    how do i validate the required dropdown? already tried a lot with https://contactform7.com/2015/03/28/custom-validation/
    no success so far…

The topic ‘validate custom dropdown, inserted by shortcode’ is closed to new replies.