• This is a minor issue, but I am noticing that across multiple websites, if the reCAPTCHA shortcode is placed in a <p> tag on a form, the plugin rewrites/eliminates that <p> tag.

    I can put all the other form elements in <p> tags (so they get styled with things such as bottom margins), but for the reCAPTCHA I have to put it in a <div> tag and add any style manually.

    It would be nice if the plugin would allow the reCAPTCHA to sit in a <p> tag so I don’t have to take the extra step of hard-coding style info into the form. It would also be better for responsive design where the paragraph styles might change between desktop and mobile.

    Is this possible?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You don’t need to wrap [recaptcha] with <p></p>. A reCAPTCHA widget is a div element so it shouldn’t be placed inside another p element.

    Thread Starter jeffersonpowers

    (@jeffersonpowers)

    Almost every WordPress theme adds a bottom margin to a <p> element, which creates a vertical space between paragraphs.

    Since I can’t put the reCAPTCHA in a <p> tag, it doesn’t have a matching bottom margin, and the “send” button (or whatever is below the reCAPTCHA on the form) sits directly under it, with no space in between — the spacing doesn’t match the rest of the form.

    The only way I can see to add a bottom margin to the reCAPTCHA element is to either edit the theme’s CSS (not always practical), or enclose the [recaptcha] in an additional div tag with inline css (not particularly good practice) to add the bottom margin so that the reCAPTCHA element matches all the other form elements.

    I wouldn’t need to do either of these things if the reCAPTCHA element could be enclosed in a <p> tag. Does that make sense?

    Is there a particular reason why the plugin won’t allow the [recaptcha] to be enclosed in a <p> tag?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘reCAPTCHA in tag’ is closed to new replies.