• Resolved zebelxan

    (@zebelxan)


    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

    (@drew010)

    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 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.