I'm using Webform and the Captcha module together. They work fine until I use multi page forms, where a captcha challenge is presented at the end of each page. Since the values are only held in the session variable until the final submit I don't see this as necessary, but I can't see any options for it, or how to stop it happening.

I'd like to just have the captcha at the end pf the whole form. Is this feature by design or a bug or just the way captcha works? Is there a work around for this?

Thanks

Comments

soxofaan’s picture

Title: Captcha repeats on multipage forms » CAPCHA repeats on multipage forms
Category: bug » feature

Currently, CAPTCHA is not tailored towards multipage forms, as it looks only for the form_id, which is the always the same for multipage forms

A workaround is using the appropriate persistence mode like "Omit challenges for a form once the user has successfully responded to a challenge for that form."

JGO’s picture

It would be great if I could have the captcha on the last page only.
Any solution possible for this? Perhaps programmatically call the captcha stuff ?

soxofaan’s picture

Version: 6.x-1.0-rc2 » 6.x-2.x-dev

In the 6.x-2.x branch of CAPTCHA, the CAPTCHA stuff is defined as a 'captcha' form element.
This means that you can add a CAPTCHA programmatically to your forms yourself without the CAPTCHA admin UI as follows:

  $form['captcha'] = array(
    '#type' => 'captcha',
  );

This will add the default challenge to the form. You can also set the challenge type by setting the '#captcha_type' field too, e.g.

    '#captcha_type' => 'captcha/Math',

or

    '#captcha_type' => 'image_captcha/Image',

hope this helps

wundo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)