Contact Form 7 + WordPress REST API
-
Good morning, sir,
I have a problem with contact 7 form that I want related to my Vuejs front. I use the rest api of wordpress.
I’m getting my inputs back. I use axios. My post works with Insomnia. But not with my dev site.data: function () { return { form: { nameTest: '', mail: '', message: '', }, errors: [], url: 'https://mywebsite.com/wp-json/contact-form-7/v1/contact-forms/143/feedback' } }, methods: { submitForm() { axios.post(this.url, this.form) .then((response) => { console.log(response); this.errors = []; }) .catch((error) => { this.errors = error.response.data.message }); } },
And the response on submit :
into: "#" status: "validation_failed" message: "Un ou plusieurs champs contiennent une erreur. Veuillez vérifier et essayer à nouveau." invalidFields: (2) [{…}, {…}]
Any idea ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Contact Form 7 + WordPress REST API’ is closed to new replies.