I'm using contact form 7 in a website for get REQUEST QUOTE
of each product.
Link to example
When visitor submit the REQUEST QUOTE
form then I get a mail with desalts and want to get each single post title in that mail. I used [_post_title]
code for get single post title and I got title. But I got only one post title from top of the page.
How I can get every single post title in the mail ?
Because Contact Form 7 stores its contact form data as a custom post (post type: wpcf7_contact_form ), you can export and import form data via Tools > Export and Tools > Import in the WordPress admin screen. In the Export menu, choose Contact Forms if you want to export contact form data only.
Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
There's no additional setting up needed — the submissions you get through Contact Form 7 will be stored in the wp_posts database. If you want to see them, you can head over to the newly added Flamingo tab on your website's dashboard. There, you'll notice the “Address Book” and the “Inbound Messages” options.
It's purely PHP. $val = esc_url("https://www.yourdomain.com".$_SERVER['REQUEST_URI']); $form = str_replace( 'pageurl', $val, $form );
Here you are,
[_remote_ip]
This tag will be replaced by the sender’s client IP
address. [_user_agent]
This tag will be replaced by the sender’s
user agent information. [_url]
This tag will be replaced by the URL
of the contact form. [_date]
This tag will be replaced by the date
of the submission. [_time]
This tag will be replaced by the time of
the submission. [_post_id]
This tag will be replaced by the ID of
the post which contains the contact form.[_post_name]
This tag
will be replaced by the name (slug) of the post which contains the
contact form. [_post_title]
This tag will be replaced by the title
of the post which contains the contact form. [_post_url]
This tag
will be replaced by the permalink of the post which contains the
contact form. [_post_author]
This tag will be replaced by the
author name of the post which contains the contact form.
[_post_author_email]
This tag will be replaced by the author email
of the post which contains the contact form.
[_serial_number]
This
tag will be replaced by a numeric string whose value increments.
Requires Flamingo 1.5+ be installed.Hope them will help you, You can also see more here. See document for Contact Form 7 Get: post id, post title, post url,..and more
Install Contact Form 7 Dynamic Text Extension and use this code inside form In Form Tab of CF7
[dynamichidden unique-name "CF7_get_post_var key='title'"]
[dynamichidden page-url "CF7_URL"]
In Mail Tab :
To Output this data , you can use the tag [unique-name] in Subject or Message body in CF7 Mail tab
For Current Page title : [dynamichidden unique-name "CF7_get_post_var key='title'"]
For Current Page Link :
[dynamichidden page-url "CF7_URL"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With