How can I hook forms to my custom plugin?
Question
I’m creating a plugin that does API requests. I want to create forms using wordpress editor, elementor or WPforms so that when a user submits the form, the plugin receives each value in a form as a variable, does API request, then return the result.
my current plugin looks like that
<?php
function APIcall($param1, $param2){
// body of the API call
return $res;
}
// Add shortcodes
add_shortcode( 'myplugin_testAPI','APIcall') ;
0
forms, php, plugin-development, rest-api
3 years
2020-07-21T03:10:31-05:00
2020-07-21T03:10:31-05:00 0 Answers
37 views
0
Leave an answer