I am trying to write a plugin that will be able to process four or five different forms, some of which will print the result to the page, and some of which will print it through AJAX. What is the best way to do this?
I have looked at several plugins that process forms, and they all seem to do it differently:
comment_form has action="#" and I can't figure out where the code that process the form is located
contact_form has action=$_SERVER['REQUEST_URI'], and I can't figure out where the code that processes the form is located
rating has action="submit" and the processing appears to be done by the update.php file
register_user has action=register_user and the code appears to be in the plugin file itself. However, when I try this, the code runs every time
Can someone give me some pointers on how to do this?
Thanks.