aurovrata / cf7-grid-layout

A WordPress plugin extension for Contact Form 7 to design responsive grid-layout forms.
https://wordpress.org/plugins/cf7-grid-layout/
GNU General Public License v2.0
6 stars 7 forks source link

added condition for really simple captcha that gets called twice… #12

Closed netzgestaltung closed 4 years ago

netzgestaltung commented 5 years ago

… otherwise - and does not validate

netzgestaltung commented 4 years ago

yes - maybe its also questionable why all fields are gettings a second validation but that was not my topic.

aurovrata commented 4 years ago

they are not actually... the CF7 filter "wpcf7validate{$type}" is removed when the Smart Grid is activated. I built this function in order to cross-validate fields, something not possible with CF7 plugin.

You will notice this filter is triggered a few lines down 'cf7sg_validate_submission' which passes all the submitted data, allowing users to validate a field based on other submitted values.

This is very useful for more complex forms with a lot of data submitted. I build data analytic tools and this plugin was developed to build a real-time carbon footprint calculator. Cross-validation was one of the requirements.

Although in the case of the recaptcha, the Really Simple Captcha plugin must be hooking a different filter.

aurovrata commented 4 years ago

PS: appreciate the time you took to fix the issue, not always easy to go through someone else's code. Feel free to suggest other changes/improvements.

netzgestaltung commented 4 years ago

would you mind looking into the other PR so i can update as well?

aurovrata commented 4 years ago

I did and it was included in the v2.11. The PR was accepted and closed, which automatically merges into the master branch and therefore makes it to the next release, did you not see it?