添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

{
“your-name”: “John Doe”,
“your-email”: “[email protected]”,
“your-message”: “This is a test message”
}

The page I need help with: [ log in to see the link]

[Symbol(state)]: [ { name: 'your-email', value: '[email protected]' }, { name: 'newsletter', value: 'SUBSCRIBE' }, { name: '_wpcf7', value: '2039' }, { name: '_wpcf7_version', value: '5.9.2' }, { name: '_wpcf7_container_post', value: '3653' }, { name: '_wpcf7_posted_data_hash', value: '' }, { name: '_wpcf7_locale', value: 'en_US' }, { name: '_wpcf7_unit_tag', value: 'wpcf7-f2039-p3653-o1' } MLX Form Success: { id: '1qyk770', valid: true, posted: true, errors: {}, data: { email: '[email protected]', newsletter: 'on', _wpcf7_unit_tag: undefined, _wpcf7: undefined, _wpcf7_version: undefined, _wpcf7_locale: undefined, _wpcf7_container_post: undefined, response: 200 constraints: { email: { required: true }, newsletter: { required: true }, _wpcf7_unit_tag: { required: true }, _wpcf7: { required: true }, _wpcf7_version: { required: true }, _wpcf7_locale: { required: true }, _wpcf7_container_post: { required: true }

The same payload to the same endpoint in Postman gives a unit tag error, although that is the unit tag from the WordPress version of the form page which works:

{"code":"wpcf7_unit_tag_not_found","message":"There is no valid unit tag.","data":{"status":400}}

It appears that in order to protect against SPAM, it is no longer possible to submit from React/Vue/SvelteKit frontend?

Any insight anyone has would be greatly appreciated. Would prefer not to stick at the older version, but it does still work.

All the best,
Morgan
🙏

The only way I have found to get all the needed form data is:
– embed the shortcode in a Post or Page
– view the page (i.e. the WordPress version, not frontend rendered)
– right click on first form field and ‘inspect element’
– look for the <form> tag just above the first form field, and just below it there is a hidden <div> with all the CF7 ‘special fields’

<div style="display: none;">
    <input type="hidden" name="_wpcf7" value="2039">
    <input type="hidden" name="_wpcf7_version" value="5.8.5">
    <input type="hidden" name="_wpcf7_locale" value="en_US">
    <input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f2039-p3653-o1">
    <input type="hidden" name="_wpcf7_container_post" value="3653">
    <input type="hidden" name="_wpcf7_posted_data_hash" value="">

The first hidden <input) is _wpcf7, and that is the Form ID. The rest of the input are named in a self explanatory way.

All the best 🙏