Title: Select made using Shortcode
Last modified: October 6, 2020

---

# Select made using Shortcode

 *  [ionian](https://wordpress.org/support/users/ionian/)
 * (@ionian)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/select-made-using-shortcode/)
 * Hi,
    I have made some selects on my page using shortcodes drawing data from the
   database and they work fine.
 * The only problem I have is that even if I set them as requires the validation
   is not picking them up.
 * I have added the same classes as the regular dropdowns but still no luck.
 * For example the shortcode outputs:
    <select name=”io-country” class=”wpcf7-form-
   control wpcf7-select wpcf7-validates-as-required” aria-required=”true” aria-invalid
   =”false”>
 * Could you point me in the right direction with this please?
 * Thank you.
    Ionian

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/select-made-using-shortcode/#post-13501749)
 * See [Custom validation](https://contactform7.com/2015/03/28/custom-validation/)
 *  Thread Starter [ionian](https://wordpress.org/support/users/ionian/)
 * (@ionian)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/select-made-using-shortcode/#post-13505517)
 * Hi and thanks for the reply.
 * Does this work even when the select is built with a short code?
    I’m having a
   few problem with it and just want iron out a few possibilities.
 * So the select would look like:
 * <select name=”io-country” class=”wpcf7-form-control wpcf7-select wpcf7-validates-
   as-required” aria-required=”true” >
 * Where the $tag->name would be “io-country”?
 * Thank you
    Ian
 *  Thread Starter [ionian](https://wordpress.org/support/users/ionian/)
 * (@ionian)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/select-made-using-shortcode/#post-13505966)
 * I can get this to work and provide a custom response if I use the CF7 code in
   the form:
    <label>TEST SELECT *[select* test-select]</label>
 * but if I create the select using a custom shortcode.
    <label>TEST SELECT *[io_test_select]
   </label>
 * Thanks again for any clarity on this.
    Ian.
    -  This reply was modified 5 years, 8 months ago by [ionian](https://wordpress.org/support/users/ionian/).
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/select-made-using-shortcode/#post-13506735)
 * See [Adding a custom form-tag](https://contactform7.com/2015/01/10/adding-a-custom-form-tag/)
 * You can’t use [WP shortcodes](https://developer.wordpress.org/plugins/shortcodes/)
   in a form template of Contact Form 7.

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

The topic ‘Select made using 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/select-made-using-shortcode/#post-13506735)
 * Status: not resolved