Contact Form 7 Image Captcha Shortcode

Below, you’ll find a detailed guide on how to add the Contact Form 7 Image Captcha Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Contact Form 7 Image Captcha Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Contact Form 7 Image Captcha Plugin and the shortcodes it provides:

Plugin Icon
Contact Form 7 Image CAPTCHA, WPForms Image CAPTCHA, Contact Form 7 Spam Image CAPTCHA, WPForms Spam Image CAPTCHA, GDPR

"Contact Form 7 Image CAPTCHA is a vital plugin that adds an extra layer of security to your forms. It prevents spam while ensuring GDPR compliance. Compatible with both Contact Form 7 and WPForms."

★★★★☆ (36) Active Installs: 80000+ Tested with: 6.3.2 PHP Version: 7.0
Included Shortcodes:
  • [cf7ic-demo]

Contact Form 7 Image Captcha [cf7ic-demo] Shortcode

The Contact Form 7 Image Captcha shortcode is used to invoke the CAPTCHA functionality in a form. It integrates image-based CAPTCHA to enhance form security. This shortcode calls the ‘call_cf7ic_pro’ function, which enqueues necessary styles and scripts, and generates the CAPTCHA.

Shortcode: [cf7ic-demo]

Examples and Usage

Basic example – A simple usage of the shortcode to call the Contact Form 7 Image Captcha plugin.

[cf7ic-demo /]

PHP Function Code

In case you have difficulties debugging what causing issues with [cf7ic-demo] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('cf7ic-demo', 'call_cf7ic_pro');

Shortcode PHP function:

function call_cf7ic_pro($tag)
{
    wp_enqueue_style('cf7ic_style'); // Enqueue CSS
    wp_enqueue_style('cf7ic_fontawesome_style'); // Enqueue CSS
    wp_enqueue_script('cf7ic_script'); // Enqueue script

    return cf7ic_generate_CAPTCHA();
}

Code file location:

contact-form-7-image-captcha/contact-form-7-image-captcha/includes/module-wpforms.php

Conclusion

Now that you’ve learned how to embed the Contact Form 7 Image Captcha Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *