Title: validate custom dropdown, inserted by shortcode
Last modified: October 9, 2019

---

# validate custom dropdown, inserted by shortcode

 *  [ffwebdesigner](https://wordpress.org/support/users/ffwebdesigner/)
 * (@ffwebdesigner)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/validate-custom-dropdown-inserted-by-shortcode/)
 * 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/](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.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [validate](https://wordpress.org/support/topic-tag/validate/)

 * 0 replies
 * 1 participant
 * Last reply from: [ffwebdesigner](https://wordpress.org/support/users/ffwebdesigner/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/validate-custom-dropdown-inserted-by-shortcode/)
 * Status: not resolved