How do I implement form handling when form is custom HTML?

Question

I am new to WP and back-end in general. I want to make a site with multiple forms and I am curios how and where do I handle them ?

One of those forms is a form inside footer in which the user is supposed to input its email address in order to subscribe to a newsletter.

The footer is added via custom html and the form inside it looks like this:

        <form action="" method="post">
          <input
            type="email"
            name=""
            id=""
            placeholder="Enter your e-mail address"
          />
          <button type="submit">Sign Up</button>
        </form>

I’ve linked the WP site to a database and, as such, I would like to store the inputted emails into a table. How can I do that ? I am not proficient in PHP, but I don’t think it’s that hard to search up how to handle email forms.

The problem is that I have no idea where to write the code. I am used to creating ExpressJS handlers, but with WP I have no idea what to do.

Also, do form plugins handle the back-end as well ? Or are they only front-end elements ? And if they also handle the back-end, what plugin would you recommend for a multi-form that takes into account every choice of the user and then redirects him to the proper page/product ?

Thank you.

0
Jorje12 2 months 0 Answers 10 views 0

Leave an answer