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

Forms can handle both the front end and back end. If you don’t code the forms correctly, there can be some huge security issues that will arise. With what you are talking about, you will have to use a WordPress hook something like this:

function your_function() { //your form here } add_action( 'wp_footer', 'your_function' );

This will put your form in the footer on the page. You will want to put your code in a custom plugin – so that the user can add it to his/her site.

In order to do this, here are some references to point you in the right direction.

https://developer.wordpress.org/reference/hooks/wp_footer
https://developer.wordpress.org/plugins/intro
https://www.sitepoint.com/build-your-own-wordpress-contact-form-plugin-in-5-minutes/

The tutorial from sitepoint should get you started. The tutorial goes through some plugin building and creating a form. After you have that – just implement the code

function your_function() { //your form here } add_action( 'wp_footer', 'your_function' );

Code reference: developer.wordpress.org/reference/hooks/wp_footer

Now regarding your other question about database tables – that a whole other beast. Here is the documentation for that: https://codex.wordpress.org/Creating_Tables_with_Plugins

Depending on your level of coding experience – you may want to just find an over-the-counter plugin to handle this. There is a reason WPforms and ContactForms7 are widely used – it takes a lot of work to create a plugin that will handle forms well.