• Hi,

    we have a real estate website and use CF7 to forward enquiries from potential customers. The real estate listings are handled with a custom post type, and the CF7 enquiry form is added in the template that displays single posts for that CPT.

    In order for us to know which property listing the enquiry is related to, we use the CF7 mail-tag “[_url]” so that when we receive an email notification, this URL data is included so we can see which listing the form submission came from.

    The problem we face is that when we look at the list of enquiries stored using CFDB7, we don’t know which listings each entry is related to, because this field (which I think must be a hidden field in CF7 ? which is passed to the outgoing email notification) is not included.

    Is there any possibility that you might be able to add support for this field data?

Viewing 4 replies - 1 through 4 (of 4 total)
  • COP

    (@wpvncom)

    Hi, I’m also a plugin developer and currently facing the same issue as you. I found a workaround by modifying the line:

    if( $rm_underscore ) preg_match('/^_.*$/m', $key, $matches);
    if( ! empty($matches[0]) ) continue;

    and replacing it with:

    if( $rm_underscore && $key !== 'url' ) { preg_match('/^.*$/m', $key, $matches);
    if( ! empty($matches[0]) ) continue;
    }

    Additionally, you can add some other hidden fields using: https://contactform7.com/special-mail-tags/

    Thread Starter aljuk

    (@aljuk)

    @wpvncom

    Thanks, I really appreciate the response, I will give that a try.

    COP

    (@wpvncom)

    Additionally, you need to insert the following line before $form_data = apply_filters('cfdb7_before_save_data', $form_data);

    $form_data['_url'] = isset($_SERVER['HTTP_REFERER']) ? esc_url_raw($_SERVER['HTTP_REFERER']) : '';
    Thread Starter aljuk

    (@aljuk)

    Ok, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Save hidden URL field ?’ is closed to new replies.