I have a page template having a form which further have 3 input fields and and a submit button. I have a written a function in a plugin which inserts the retrieved values in database. I am trying to figure out what to write in action attribute of the form, so that when user clicks the submit button, the function gets executed?
Output The Form
Can be done via Shortcode API.
What Should Be Set on Form Action
Leave it blank
How Can We Validate or Process The Form?
Hope it makes sense. This is how I usually handle form submission.