Debugging reCAPTCHA Visibility in Contact Form 7
When a wpcf7-form-control element exists in the rendered HTML but remains invisible to the user, the issue is almost never the shortcode syntax or the missing script tag. In the scenario you described, the browser has successfully retrieved the Google site key and injected the <noscript> fallback, which confirms that the core plugin logic executed. The fact that the main div is present in the source code but empty implies a CSS rendering conflict or a specific layout constraint is preventing the widget from materializing.
The primary suspect in this situation is usually CSS specificity or z-index conflicts. While you mentioned checking your CSS, it is vital to look beyond just "blocking" rules. The reCAPTCHA plugin often injects its own styles, but if your theme or a third-party styling library (like the apo-moved-label classes visible in your HTML) applies a rule that sets display: none on elements with certain attributes, or if a parent container has an overflow constraint, the widget will fail to render.
Examine your stylesheet for rules targeting .wpcf7-form-control or .g-recaptcha. A common pitfall involves global reset styles in themes that inadvertently target these classes. If your theme forces all inputs or divs within a specific wrapper to display: none, the reCAPTCHA box will vanish even though the DOM structure is intact. Use the browser's developer tools to inspect the element. Look for inline styles like style="display:none" that might be applied dynamically by JavaScript, or check if a parent container has overflow: hidden which could clip the widget if it attempts to resize during initialization.
Another frequent cause involves the order of your enqueue scripts and the presence of conflicting Google API libraries. If your theme or another plugin loads a different version of the reCAPTCHA script (for example, v2 vs. v3 confusion), it might interfere with the specific site key logic Contact Form 7 injects. Ensure that the g-recaptcha.js script is loaded correctly and that no other script is attempting to override the initialization parameters.
You should also verify that your theme does not apply a fixed height or width to the form container that restricts the reCAPTCHA box from expanding to its required dimensions. The fallback HTML you showed has explicit dimensions (302px by 422px). If your CSS forces the parent .wpcf7-form-control-wrap to have a smaller height, the widget may appear "collapsed" or invisible depending on how the browser calculates its rendering context.
If standard CSS inspection yields no obvious blockers, consider clearing any caching layers, including object cache plugins or server-side caches, as stale stylesheets can sometimes cause these visibility issues to persist after a code change. Additionally, ensure that no JavaScript errors are occurring in the console that might be preventing the plugin's initialization script from firing.
For complex themes where debugging standard CSS becomes cumbersome, utilizing a dedicated reCAPTCHA styling helper or wrapping the form in a container with explicit position: relative can sometimes resolve z-index stacking issues. If you are building a custom theme based on Laravel concepts, remember that while backend logic handles the data submission, frontend rendering is entirely dependent on the browser's interpretation of your CSS hierarchy.
If none of these steps resolve the issue, consulting the specific documentation for your reCAPTCHA version (v2 or v3) regarding their new loading methods might be necessary, as implementation details have shifted over recent years to prevent exactly this type of silent failure.