• I’m trying to achieve an instance of “adaptive placeholders“, but it seems to require that a label tag is created within the same parent as the input field. CF7 seems to generate input fields within a span, and short of utilizing possibly unnecessary javascript markup, it doesn’t seem that there’s a way to insert anything else in that span field, out of the box.

    here’s what’s generated with

    [text* contact-1-name]
    		<label alt='name' placeholder='name'></label>

    <span class="wpcf7-form-control-wrap contact-1-name"><input type="text" name="contact-1-name" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span>
    		<label alt='name' placeholder='name'></label>

    Again, I need the label tag within the span; and I’m wondering if that’s possible with any advanced shortcode. Either way, thanks so much for the amazing plugin!

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 1 replies (of 1 total)
  • As a workaround you can put the pregenerated HTML source directly in the CF7 editor instead the shortcodes:

    '<span class="wpcf7-form-control-wrap contact-1-name"><input type="text" name="contact-1-name" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span>
    		<label alt='name' placeholder='name'></label>'
Viewing 1 replies (of 1 total)
  • The topic ‘Label tag within text-field generated span?’ is closed to new replies.