Title: problem validating when using shortcode
Last modified: November 21, 2016

---

# problem validating when using shortcode

 *  Resolved [zebelxan](https://wordpress.org/support/users/zebelxan/)
 * (@zebelxan)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/problem-validating-when-using-shortcode/)
 * Hello Dear Drew010,
    i tried very captcha plugins but your plugin is very nice
   and simple.
 * but i have some trouble with that:
 * 1- when captcha box is empty or wrong, it completely goes to another page and
   alert that captcha is empty or wrong, but, it is better the alerts shown inside
   the form near captcha.
    how can i show error alerts inside my form?
 * 2- when i use captcha in other custom forms via shortcode “[siwp_show_captcha]”,
   there is no validation for captcha and the form is done without any alert about
   empty or wrong captcha.
 * please guide me by answering these questions
    Best Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [drew010](https://wordpress.org/support/users/drew010/)
 * (@drew010)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/problem-validating-when-using-shortcode/#post-8486557)
 * Hi,
 * In response to #1 – this is because of how the form works. In order to show the
   errors on the same page, it would need to use Ajax to submit and process the 
   form.
 * 2. When using the shortcode, you need to manually validate the captcha in code.
   There’s no magic that will do it automatically. You have to call siwp_check_captcha()
   in the form processor which may or may not be possible if you’re embedding the
   shortcode in another plugin.
 * Because of this, the shortcode is an advanced feature and requires some programming
   knowledge but allows developers to use the captcha in any context, not just posts/
   pages.
 * There is an example WordPress page with code at [https://gist.github.com/dapphp/ab9016409535a6638816](https://gist.github.com/dapphp/ab9016409535a6638816)
   that shows how to do this. You’ll also need a plugin (e.g. Exec-PHP) that allows
   PHP code execution in WP pages.
 * Are you trying to add the shortcode to a form plugin page? If so, which one?

Viewing 1 replies (of 1 total)

The topic ‘problem validating when using shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/securimage-wp_ffffff.svg)
 * [Securimage-WP](https://wordpress.org/plugins/securimage-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/securimage-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/securimage-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/securimage-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/securimage-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/securimage-wp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [drew010](https://wordpress.org/support/users/drew010/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/problem-validating-when-using-shortcode/#post-8486557)
 * Status: resolved