2012-07-17 65 views
4

我需要一個定製的感謝頁面,在提交聯繫表單(contactform7)後會顯示出來,表單會顯示用戶輸入的姓名和電子郵件地址。下面聯繫表7謝謝頁總結

就是例子謝謝頁:

謝謝XXX:從我們的辦公室會有人與您聯繫通過[email protected]在24小時內得到。

回答

4

我想出了一個解決方案,通過利用聯繫表單7的附加設置並在這些設置中放置了以下代碼。


注意:它只適用於基於Ajax的表單。

on_sent_ok: "var name = $('.wpcf7 input[name=your-name]').val();var email = $('.wpcf7 input[name=your-email]').val();$('.wpcf7').hide();$('.entry-title').html('Thank you');$('.entry-content').html('thank you '+name+' : someone from our office will get in touch with you via '+email+' within 24 hours.');" 



打開您的聯繫方式配置頁,並粘貼上面的代碼如下所示:

Additional Settings window

樣本輸出:

Sample Output

+0

你可以使用這個簡單的使用插件https://wordpress.org/plugins/cf7-redirec T / – 2015-07-22 12:11:47