我對編程很陌生,我想提取并保存使用我的聯系表 7 的人的電子郵件地址。
我可以通過使用提取聯系表單 ID
function action_wpcf7_mail_failed( $contact_form ) {
$aet_formid = $contact_form->id; // this returns the id of the contact form
}
但是當我使用
$aet_form_email = $contact_form->post_author_email; // this returns null
我可以知道我應該使用哪個屬性來獲取用戶在表單中輸入的電子郵件嗎?
我非常感謝您能提供的任何幫助。
uj5u.com熱心網友回復:
請將此添加到您的功能中:
$submission = WPCF7_Submission::get_instance();
$posted_data = $submission->get_posted_data();
該$posted_data變數包含您需要的所有值。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/480616.html
