简体   繁体   English

在 React 中使用联系表 7

[英]Using Contact Form 7 with React

我正在尝试在 React 中构建 wp 主题。

you should be able to get the form data trough the rest api by requesting the correct post ID, and then parse the tags yourself, or you could probably also create your own endpoint that returns the generated HTML.您应该能够通过请求正确的帖子 ID 通过 rest api 获取表单数据,然后自己解析标签,或者您也可以创建自己的端点来返回生成的 HTML。

If you are looking for a way to post the form, you need to post the data to this endpoint: http://www.yourdomain.com/wp-json/contact-form-7/v1/contact-forms/FORM-ID/feedback如果您正在寻找发布表单的方法,则需要将数据发布到此端点: http : //www.yourdomain.com/wp-json/contact-form-7/v1/contact-forms/FORM-身份证/反馈

It's explained pretty clearly here: https://medium.com/@mahesh_joshi/wordpress-contact-form-7-rest-api-endpoints-bf45907b571c这里解释得很清楚: https : //medium.com/@mahesh_joshi/wordpress-contact-form-7-rest-api-endpoints-bf45907b571c

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM