Contact Form 7
Custom Fields into special Mail Tags (2 posts)

  1. Thann
    Posted 2 years ago #

    is there a way to extract custom fields of a post and use their values in the form sending information like described here http://contactform7.com/special-mail-tags/ ?
    In particular, I have the custom field called 'email' which contains email, which I want to send an email to on form submission. So, I want to take the value of that custom field 'email' and set in into the field "To" in the Mail sending information.
    Is there a way to do so?

    Thank you in advance for your help.

    Best regards


  2. Thann
    Posted 2 years ago #

    now I found how to do it using Contact Form 7 - Dynamic Text Extension:
    But I have got another issue: I am displaying all posts from the certain category as accordion tabs (using WP UI Options Plugin). In each of the posts I am displaying the same CF7 Form. The problem is that I cannot get the custom fields of the post containing the form. It seems that form gets attached to the parent page (which shows all my posts) and not to the post that contains the form. Thus, when I added the field [dynamictext user_email "CF7_get_custom_field key='email'"] into the form it displays the custom field of the page which contains this accordion of posts and not that of each post containing the form.
    I also tried to get the ID by the Special Mail Tag [_post_id] which also shows the ID of parent page.
    I also tried to dynamically set the "id" attribute of the [contact-form-7] shortcode, but it is not changing. Although in the post content I see the dynamically set "id", when I extract the id of the current form object it is the same as it says in the form which i created initially in Contacts.
    How can I use multiple instances of the same form and change their "id"-s or some other attributes? Which attributes of [contact-form-7] can be changed when using the same form multiple times on one page?
    Is there a way to somehow mark the form by ID of the nested post which contains it?

    Thank you in advance for your help.

    Best regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic