verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 68 forks source link

multipage & Display Page Tabs: friendly-captcha initialisation #1893

Open TurboThomsen opened 1 month ago

TurboThomsen commented 1 month ago

Describe the bug

I have an issue where friendly-captcha is not initialised. Valide forms are marked as Spam on successful Submit.

Steps to reproduce

  1. Create multi page form (2 pages) with "Display Page Tabs": true and Friendly Captcha
  2. Fill out all required fields on page one
  3. Choose next page by clicking on tab two (not the "next" Button) -> no friendly captcha
  4. Fill out all required fields on page two
  5. Submit -> Successfull -> But Spam

Form settings

Craft CMS version

4.9.3

Plugin version

2.1.14

Multi-site?

Yes

Additional context

No response

TurboThomsen commented 1 month ago

my considered solutions:

engram-design commented 1 month ago

I will mention that clicking on the tabs of a page is not a submission action. None of your content from the first page will be submitted and saved. This is because page tabs are a navigation action.

I see what you mean about that behaviour, and can confirm I see that on my end. Captchas are only initialized after a page submit.

This should be addressed in Formie 3 which has more smarts about initializing captchas. Once the placeholder is visible, the captcha will be initialized (the placeholder being near the last page's submit button).

I'll have a look at back-porting this behaviour to Formie 2, but it's a potentially breaking change that I was intending to keep guarded by a major release.