• amedic

    (@amedic)


    Hi,

    I’m using Contact Form 7 – Dynamic Text Extension to get an email of the user who creates the custom post. But when I use it in TO than I get a syntax error.
    I’m not sure how can I use your plugin to send an email to the user who creates the post?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Got the exact same problem. And can I use multiple recipients? in some cases I the mail on my site needs to be send to two recipients.

    Plugin Author John Huebner

    (@hube2)

    I’m not sure how to tell you to do this.

    The filter that you need to build for this plugin can use the value of other fields in the form. For example, if you had a hidden field what has the user ID of the current user named ‘user_id’ you can pass the value of that field to the filter in this plugin by including another hidden field named “dynamic-mail-to-fields” with the value “user_id”. Then you can get the user’s email from that in the filter that sets the email address.

    There are two fields that this plugin depends on to work and it’s better if both of them are hidden.

    The first is the field named “dynamic-mail-to-filter” which sets the hook of the filter to use. For example, if you add_filter('my_dynamic_mailto_filter', 'my_dynamic_mailto_function', 10, 2) then the value of this field would be “my_dynamic_mailto_filter”.

    The second field is the one I mentioned above. The value of this field should be a comma separated list names of any other form fields in the current form whose values you want to pass to the filter. If the value was “user_id,some_other_field” then the value of the second parameter of the filter would be

    
    Array(
      [user_id] => 1,
      [some_other_field] => some other value
    )
    

    hope that helps

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use plugin?’ is closed to new replies.