WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] special mail tags within the "wpcf7_before_send_mail" hook (2 posts)

  1. iamronen
    Member
    Posted 2 years ago #

    I am using the wpcf7_before_send_mail hook to process a form (as outlined here) and I've just realized that the special mail tag fields are not available in the posted_data array.

    Is there a way to get to the information in these fields directly from code?

    http://wordpress.org/extend/plugins/contact-form-7/

  2. iamronen
    Member
    Posted 2 years ago #

    this is the hack I found:
    - there is a field in the posted_data array called "_wpcf7_unit_tag"
    - it contains (as I write these words) 4 bits of information - the third of which is the postid within which the form was embedded.

    I extracted the postid and then used get_post to get at all the information I was looking for.

    I still believe it would be more consistent behavior to include the special tags in the posted_data array.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic