• 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

    (@takayukister)

    Thread Starter ionian

    (@ionian)

    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

    (@ionian)

    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 4 years, 1 month ago by ionian.
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    See Adding a custom form-tag

    You can’t use WP 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.