Form included via shortcode showing stray "1" below submit button
-
I’ve been trying to use shortcodes on a site in order to pull in a form on only certain pages.
Here is what I added to my functions.php:
add_shortcode('inquiry','inquiry_function'); function inquiry_function() { $inquiry = include('contact-form-sidebar.php'); return $inquiry; }
I can then add forms to certain pages by using this shortcode:
[inquiry]
It works great except for one thing. For some reason, a stray number 1 is getting added just below the form. I cannot for the life of me figure out why. It is just below the form’s submit button – here’s a screenshot: https://www.twitpic.com/5ze4xv
If I include the file directly via the template file by using
include ('contact-form-sidebar.php');
…the form appears correctly, without the stray “1” – so it doesn’t appear to be an issue with the form code itself.
Any ideas where the stray “1” is coming from? Thanks!
- The topic ‘Form included via shortcode showing stray "1" below submit button’ is closed to new replies.