Fatal error when submitting Formidable Forms form
-
Hi,
I am using hCaptcha with both WooCommerce and Formidable Forms (free version). It’s working great with WooCommerce, but when I submit the contact form I built with Formidable Forms, I get the following error:
Fatal error: Uncaught TypeError: HCaptcha\FormidableForms\Form::prevent_native_validation(): Argument #2 ($field) must be of type HCaptcha\FormidableForms\stdClass, stdClass given, called in /home/tuscancorp/dev.tuscancorp.com/wp-includes/class-wp-hook.php on line 324 and defined in /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/hcaptcha-for-forms-and-more/src/php/FormidableForms/Form.php:135 Stack trace: #0 /home/tuscancorp/dev.tuscancorp.com/wp-includes/class-wp-hook.php(324): HCaptcha\FormidableForms\Form->prevent_native_validation() #1 /home/tuscancorp/dev.tuscancorp.com/wp-includes/plugin.php(205): WP_Hook->apply_filters() #2 /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/formidable/classes/models/fields/FrmFieldCaptcha.php(319): apply_filters() #3 /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/formidable/classes/models/fields/FrmFieldCaptcha.php(289): FrmFieldCaptcha->should_validate() #4 /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/formidable/classes/models/FrmEntryValidate.php(217): FrmFieldCaptcha->validate() #5 /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/formidable/classes/models/FrmEntryValidate.php(154): FrmEntryValidate::validate_field_types() #6 /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/formidable/classes/models/FrmEntryValidate.php(37): FrmEntryValidate::validate_field() #7 /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/formidable/classes/controllers/FrmEntriesController.php(549): FrmEntryValidate::validate() #8 /home/tuscancorp/dev.tuscancorp.com/wp-includes/class-wp-hook.php(322): FrmEntriesController::process_entry() #9 /home/tuscancorp/dev.tuscancorp.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #10 /home/tuscancorp/dev.tuscancorp.com/wp-includes/plugin.php(517): WP_Hook->do_action() #11 /home/tuscancorp/dev.tuscancorp.com/wp-settings.php(665): do_action() #12 /home/tuscancorp/dev.tuscancorp.com/wp-config.php(104): require_once(‘/home/tuscancor…’) #13 /home/tuscancorp/dev.tuscancorp.com/wp-load.php(50): require_once(‘/home/tuscancor…’) #14 /home/tuscancorp/dev.tuscancorp.com/wp-blog-header.php(13): require_once(‘/home/tuscancor…’) #15 /home/tuscancorp/dev.tuscancorp.com/index.php(17): require(‘/home/tuscancor…’) #16 {main} thrown in /home/tuscancorp/dev.tuscancorp.com/wp-content/plugins/hcaptcha-for-forms-and-more/src/php/FormidableForms/Form.php on line 135
If I remove the hCaptcha from the form, it submits as expected. I used the Health Check and Troubleshooting plugin with only hCaptcha and Formidable Forms enabled and the Twenty Twenty-One theme to check for plugin conflicts, but the error was the same.
Some info about the website:
- WordPress 6.4.3
- PHP 8.1
- hCaptcha 3.9.0
- Formidable Forms 6.8.2
I’ll be taking this website live tomorrow, so depending on when you see this, the website may be at www rather than dev. I’ve removed hCaptcha from the form for now.
Please let me know if you need any other information to help troubleshoot this issue. Thank you!
The page I need help with: [log in to see the link]
- The topic ‘Fatal error when submitting Formidable Forms form’ is closed to new replies.