[Plugin: Real Simple Contact Form] Would be nice if shortcode returned HTML, rather than echoing
-
It’s awesome that this plugin has a shortcode [realsimplecontactform] so that users could potentially insert the form on any page, however shortcodes are supposed to *return* HTML, not echo HTML. This shortcode echoes HTML, which inserts it at the point in the page where all shortcodes are evaluated, rather than the points in the page where each one is placed.
You could just wrap the method in output-buffering to collect the contents and return them:
ob_start(); // ... output HTML, etc ... $output = ob_get_contents(); ob_end_clean(); return $output;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Real Simple Contact Form] Would be nice if shortcode returned HTML, rather than echoing’ is closed to new replies.