admin管理员组文章数量:1335451
I would like to pass data from Contact Form 7 to another subpage after submitting the form.
I would like to use the POST
method for this
- I can get to this data with the
wpcf7_before_send_mail
filter as follows:
function cf7_data()
{
$submission = WPCF7_Submission::get_instance();
$data = $submission->get_posted_data();
// Here I have a variable containing a field from the contact form
$subject = $data['your-name'];
// I don't know what to do next
}
add_action('wpcf7_before_send_mail', 'cf7_data');
- I can make redirect after submit form as follows:
document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'https://samewebsite/subpage';
}, false );
but I can't figure out how I can pass and read the $subject
variable on the subpage after the redirection
本文标签: How to pass POST data from Contact Form 7 to another subpage after submitting the form
版权声明:本文标题:How to pass POST data from Contact Form 7 to another subpage after submitting the form 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742363785a2460878.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论