Support » Plugin: Contact Form 7 Dynamic Text Extension » Fatal Error in CF7 with Dynamic Value

  • Resolved sanketzalak

    (@sanketzalak)


    Hi,

    I have Custom Function into CF7 Function File, as Follow

    /* Generate UserInfo */
    function genUsrInfo()
    {
    	global $current_user;
    	get_currentuserinfo();
    	$string = $current_user->user_login;
    	return $string;
    }
    add_shortcode('username', 'genUsrInfo');

    Now When I try to insert / use above short code “username” with Dynamic Unedited Field its shows Error

    [dynamictext dynamictext-459 "'username'"]

    Error Message :
    Fatal error: Call to undefined method WPCF7_ContactForm::get_current() in C:\wamp\www\web\wp-content\plugins\contact-form-7-dynamic-text-extension\contact-form-7-dynamic-text-extension.php on line 59

    https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author sevenspark

    (@sevenspark)

    Are you sure you’re using the latest version of Contact Form 7?

    sanketzalak

    (@sanketzalak)

    Yup, I’m sure

    Plugin Author sevenspark

    (@sevenspark)

    By the way you shouldn’t have single quotes around your shortcode

    [dynamictext dynamictext-459 "username"]

    not

    [dynamictext dynamictext-459 "'username'"]

    But you should also probably prefix your shortcode.

    Hi,

    I’m getting the same error. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal Error in CF7 with Dynamic Value’ is closed to new replies.