Support » Plugin: Contact Form 7 Database Addon - CFDB7 » _url / “Referrer-Page” removed? Why were special mail-tags removed?

  • Resolved krdevio

    (@krdevio)


    Hello,

    I noticed that “Referrer Page” field in CFDB7 has stopped working. I do see in the change log that any tags with underscores were removed: is there a particular reason? The special mail tags available in Contact Form 7 are very useful and functional, it seems to not make any sense to deliberately remove these forcing the use of another plugin or implementing custom tags.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Arshid

    (@arshidkv12)

    Please install dynamic hidden field plugin. Then add referral page url.

    Plugin Author Arshid

    (@arshidkv12)

    [dynamictext name value=”_shortcode”]

    change _shortcode. Add above shortcode in cf7 form after installation.

    Thread Starter krdevio

    (@krdevio)

    Hello Arshid,

    The point was that it seems ridiculous to have to use another plugin to support a tag that is already in Contact Form 7.

    Anyways thank you for providing filters though, I just re-implemented it myself.

    For anyone else with the same problem, as long as having Referral-Page on all of your entries is ok, you can add the following to your functions.php:

    add_filter( 'cfdb7_before_save_data', 'cfdb7_add_url', 10, 1);
    function cfdb7_add_url( $form_data ) {
        // Get submission first
        $submission = WPCF7_Submission::get_instance();
        if( empty($submission) ) return $form_data;
    
        $form_data["Referrer-Page"] = $submission->get_meta( 'url' );
    
        return $form_data;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.