最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - How to show contact form popup in same page

programmeradmin1浏览0评论

I'm designing my WordPress Website. I don't want my visitors to go for new page on clicking the contact us/get in touch button. I want my form to show up as popup (only when clicked on button).

I'm designing my WordPress Website. I don't want my visitors to go for new page on clicking the contact us/get in touch button. I want my form to show up as popup (only when clicked on button).

Share Improve this question edited Mar 5, 2020 at 7:44 Vinay Kumar L asked Mar 4, 2020 at 6:11 Vinay Kumar LVinay Kumar L 132 bronze badges 2
  • Many (if not all) contact form plugins let you place the forms anywhere, not just on their own pages. Which one are you using? Or did you mean as a pop-up lightbox or something? – Rup Commented Mar 4, 2020 at 6:29
  • Hi thanks for an answer. Yes. Its more like a pop-up. I don't want user to go for new page when he clicks on "get in touch" button. Instead he should get the form in the samepage itself as a pop-up (only when he clicks) – Vinay Kumar L Commented Mar 5, 2020 at 7:32
Add a comment  | 

1 Answer 1

Reset to default 0

if you are using Contact Form 7 which is usually one of the popular free plugins you can use shortcode to display forms on a normal page by copying this into the editor and editing the form ID and title as needed.

[contact-form-7 id="1234" title="Contact form 1"]

EDIT: You can use simply jQuery to hide/show the form

https://codepen.io/AKiwi92/pen/mdJBpPg

发布评论

评论列表(0)

  1. 暂无评论