Contact forms 2022

HI, i need to make a contact form for my site,
I don’w want to use contact form 7 dependency, how can i write the whole contact form and make it work?

Or to make that logic it would be too difficult?

Now what i did is that i downloaded a contact plugin in wordpress and embbeded the private code in a page/post, and that page/post i have calle like dangeroulsySetInnerHTML in a p, by the submit button doesn’t work

Thank you,

What you did will work.
I can also give you another suggestion. Please take this with a grain of salt as it depends on a few factors weather its the right solution for you.

So in our case, sometimes we have forms where we want to create a special experience but we still want to use our WP server to automate the transactional stuff like emails.

What we do in that case is use CF7 in Wordpress to create a form with all its mailers and fields. You will then be able to submit content to that form via the REST api.

Endpoint looks like this: /contact-form-7/v1/contact-forms/(?P<id>\\d+)/feedback
You can of course find the info for all your endpoints by going to yourdomain.com

Good luck. I hope that helps.

Hi Ni!

Thank you for your response, I’m having trouble.

When i submit the message, I get this url:

http://localhost:3000/wp-json/wp/v2/contacto/?_embed=true&page=1&per_page=100#wpcf7-f1462-o1

and also the message it’s not sent

This is my site:
https://nicolasbava-memoriafp-default.layer0-limelight.link/

you can check there,

I’m using contact form 7 by the way

Here is the plugin

Here is the custom post and page where I put the code

And here the code in Frontity

I would like to show the message about if a message was sent and also the errors if its possible.

Thank you