Hello,
I add captach module to my webform without any problems, works good. But my webform is divided to 4 pages. I want to have captcha request only in last page, before send webform. I can add only block id 'webform_client_form_#number' to captcha requirements, but it responsible in all pages, also when you want to go to next page in webform. This is irritating when you must resolve captcha in all page breakes :( I chose 'Omit challenges in a multi-step/preview workflow once the user successfully responds to a challenge.' option but not omit multi step challenges :/

It is possible to get captcha in last site of webform?

Example: http://vidicon.nazwa.pl/brodnica/zgloszenie-firmy

Comments

kazaa created an issue. See original summary.

kazaa’s picture

Issue summary: View changes
Chris Matthews’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Issue tags: -page break captcha webform

Version change only

kenwest’s picture

As this was one of the few pages that Google led me to, I thought I should share my experience.

I didn't want to protect the form until a price had been entered. so my logic is ...

function MODULE_form_alter(&$form, &$form_state, $form_id) {
  if (... this is the right form ...) {
    $price = $form_state['input']['submitted']['fieldset_1']['price'] ?? 0;
    if ($price > 0) {
      $form['MY_captcha_protection'] = [
        '#type' => 'captcha',
        '#captcha_type' => 'default',
      ];
    }
  }
}