problem with displaying forms dynamically in shortcode
-
Hi
I am creating a plugin that uses shortcode to load forms. It has two forms: 1)input form 2)output form
To add shortcode to my plugin, I use following code:function myplugin_maker_makeshortcode() {
ob_start();
myplugin_maker_apply();
html_form_code($result);
return ob_get_clean();}
add_shortcode(‘myplugin_maker_form’,’myplugin_maker_makeshortcode’);——–
Input form variables are sent to myplugin_maker_apply() function to check and generate proper output.The html_form_code() is the function that shows forms based on $result. If $result is empty, it shows input form else shows output form, But output values are set in myplugin_maker_apply function. So I try to call html_form_code() in the myplugin_maker_apply function, but as output I receive both input and output forms. How can I solve this problem to show just one of the forms based on $result value.Thanks
- The topic ‘problem with displaying forms dynamically in shortcode’ is closed to new replies.