Formidable Forms – Form Builder for WordPress - Version 5.2.04

Version Description

  • New: Defined field option data will no longer be sent to Akismet, to help improve accuracy with Akismet API.
  • Fix: Updated Elementor widget so it no longer uses the deprecated _register_controls method.
Download this release

Release Info

Developer formidableforms
Plugin Icon 128x128 Formidable Forms – Form Builder for WordPress
Version 5.2.04
Comparing to
See all releases

Code changes from version 5.2.03 to 5.2.04

classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '5.2.03';
15
 
16
  /**
17
  * @since 1.07.02
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '5.2.04';
15
 
16
  /**
17
  * @since 1.07.02
classes/models/FrmEntryValidate.php CHANGED
@@ -630,12 +630,62 @@ class FrmEntryValidate {
630
  * @param array $values Entry values.
631
  */
632
  private static function skip_adding_values_to_akismet( &$values ) {
633
- $skipped_field_ids = self::get_akismet_skipped_field_ids( $values );
634
- foreach ( $skipped_field_ids as $field_id ) {
635
- if ( isset( $values['item_meta'][ $field_id ] ) ) {
636
- unset( $values['item_meta'][ $field_id ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
637
  }
638
  }
 
 
639
  }
640
 
641
  /**
@@ -643,6 +693,7 @@ class FrmEntryValidate {
643
  *
644
  * @since 5.0.09
645
  * @since 5.0.13 Move out get_all_form_ids_and_flatten_meta() call and get `form_ids` from `$values`.
 
646
  *
647
  * @param array $values Entry values after running through {@see FrmEntryValidate::prepare_values_for_spam_check()}.
648
  * @return array
@@ -658,18 +709,11 @@ class FrmEntryValidate {
658
  $where = array(
659
  array(
660
  'form_id' => $values['form_ids'],
661
- array(
662
- array(
663
- 'field_options not like' => ';s:5:"other";s:1:"1"',
664
- 'type' => $has_other_types,
665
- ),
666
- 'or' => 1,
667
- 'type' => $skipped_types,
668
- ),
669
  ),
670
  );
671
 
672
- return FrmDb::get_col( 'frm_fields', $where );
673
  }
674
 
675
  /**
630
  * @param array $values Entry values.
631
  */
632
  private static function skip_adding_values_to_akismet( &$values ) {
633
+ $skipped_fields = self::get_akismet_skipped_field_ids( $values );
634
+ foreach ( $skipped_fields as $skipped_field ) {
635
+ if ( ! isset( $values['item_meta'][ $skipped_field->id ] ) ) {
636
+ continue;
637
+ }
638
+
639
+ if ( self::should_really_skip_field( $skipped_field, $values ) ) {
640
+ unset( $values['item_meta'][ $skipped_field->id ] );
641
+ if ( isset( $values['item_meta']['other'][ $skipped_field->id ] ) ) {
642
+ unset( $values['item_meta']['other'][ $skipped_field->id ] );
643
+ }
644
+ }
645
+ }
646
+ }
647
+
648
+ /**
649
+ * Checks if a skip field should be really skipped.
650
+ *
651
+ * @since 5.02.04
652
+ *
653
+ * @param object $field_data Object contains `id` and `options`.
654
+ * @param array $values Entry values.
655
+ * @return bool
656
+ */
657
+ private static function should_really_skip_field( $field_data, $values ) {
658
+ if ( empty( $field_data->options ) ) { // This is skipped field types.
659
+ return true;
660
+ }
661
+
662
+ FrmAppHelper::unserialize_or_decode( $field_data->options );
663
+ if ( ! $field_data->options ) { // Check if an error happens when unserializing, or empty options.
664
+ return true;
665
+ }
666
+
667
+ end( $field_data->options );
668
+ $last_key = key( $field_data->options );
669
+
670
+ // If a choice field has no Other option.
671
+ if ( is_numeric( $last_key ) || 0 !== strpos( $last_key, 'other_' ) ) {
672
+ return true;
673
+ }
674
+
675
+ // If a choice field has Other option, but Other is not selected.
676
+ if ( empty( $values['item_meta']['other'][ $field_data->id ] ) ) {
677
+ return true;
678
+ }
679
+
680
+ // Check if submitted value is same as one of field option.
681
+ foreach ( $field_data->options as $option ) {
682
+ $option_value = ! is_array( $option ) ? $option : ( isset( $option['value'] ) ? $option['value'] : '' );
683
+ if ( $values['item_meta']['other'][ $field_data->id ] === $option_value ) {
684
+ return true;
685
  }
686
  }
687
+
688
+ return false;
689
  }
690
 
691
  /**
693
  *
694
  * @since 5.0.09
695
  * @since 5.0.13 Move out get_all_form_ids_and_flatten_meta() call and get `form_ids` from `$values`.
696
+ * @since 5.2.04 This method returns array of object contains `id` and `options` instead of array of `id` only.
697
  *
698
  * @param array $values Entry values after running through {@see FrmEntryValidate::prepare_values_for_spam_check()}.
699
  * @return array
709
  $where = array(
710
  array(
711
  'form_id' => $values['form_ids'],
712
+ 'type' => array_merge( $skipped_types, $has_other_types ),
 
 
 
 
 
 
 
713
  ),
714
  );
715
 
716
+ return FrmDb::get_results( 'frm_fields', $where, 'id,options' );
717
  }
718
 
719
  /**
classes/models/FrmField.php CHANGED
@@ -177,11 +177,6 @@ class FrmField {
177
  'icon' => 'frm_icon_font frm_signature_icon frm_show_upgrade',
178
  'addon' => 'signature',
179
  ),
180
- 'quiz_score' => array(
181
- 'name' => __( 'Quiz Score', 'formidable' ),
182
- 'icon' => 'frm_icon_font frm_percent_icon frm_show_upgrade',
183
- 'addon' => 'quizzes',
184
- ),
185
  'ssa-appointment' => array(
186
  'name' => __( 'Appointment', 'formidable' ),
187
  'icon' => 'frm_icon_font frm_calendar_icon frm_show_upgrade',
177
  'icon' => 'frm_icon_font frm_signature_icon frm_show_upgrade',
178
  'addon' => 'signature',
179
  ),
 
 
 
 
 
180
  'ssa-appointment' => array(
181
  'name' => __( 'Appointment', 'formidable' ),
182
  'icon' => 'frm_icon_font frm_calendar_icon frm_show_upgrade',
classes/widgets/FrmElementorWidget.php CHANGED
@@ -22,7 +22,7 @@ if ( class_exists( '\Elementor\Widget_Base' ) ) {
22
  return array( 'general' );
23
  }
24
 
25
- protected function _register_controls() {
26
  $this->start_controls_section(
27
  'section_form_dropdown',
28
  array(
22
  return array( 'general' );
23
  }
24
 
25
+ protected function register_controls() {
26
  $this->start_controls_section(
27
  'section_form_dropdown',
28
  array(
formidable.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 5.2.03
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 5.2.04
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
languages/formidable.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Formidable Forms plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Formidable Forms 5.2.03\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/formidable\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-03-24T14:09:22+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: formidable\n"
@@ -3171,7 +3171,7 @@ msgid "This will permanently delete the form and all its entries. This is irreve
3171
  msgstr ""
3172
 
3173
  #: classes/helpers/FrmFormsHelper.php:1186
3174
- #: classes/models/FrmField.php:204
3175
  msgid "Total"
3176
  msgstr ""
3177
 
@@ -4086,18 +4086,14 @@ msgid "Signature"
4086
  msgstr ""
4087
 
4088
  #: classes/models/FrmField.php:181
4089
- msgid "Quiz Score"
4090
- msgstr ""
4091
-
4092
- #: classes/models/FrmField.php:186
4093
  msgid "Appointment"
4094
  msgstr ""
4095
 
4096
- #: classes/models/FrmField.php:194
4097
  msgid "Product"
4098
  msgstr ""
4099
 
4100
- #: classes/models/FrmField.php:199
4101
  msgid "Quantity"
4102
  msgstr ""
4103
 
2
  # This file is distributed under the same license as the Formidable Forms plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Formidable Forms 5.2.04\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/formidable\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-04-06T14:43:17+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: formidable\n"
3171
  msgstr ""
3172
 
3173
  #: classes/helpers/FrmFormsHelper.php:1186
3174
+ #: classes/models/FrmField.php:199
3175
  msgid "Total"
3176
  msgstr ""
3177
 
4086
  msgstr ""
4087
 
4088
  #: classes/models/FrmField.php:181
 
 
 
 
4089
  msgid "Appointment"
4090
  msgstr ""
4091
 
4092
+ #: classes/models/FrmField.php:189
4093
  msgid "Product"
4094
  msgstr ""
4095
 
4096
+ #: classes/models/FrmField.php:194
4097
  msgid "Quantity"
4098
  msgstr ""
4099
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Plugin Name: Formidable Forms - Contact Form, Survey & Quiz Forms Plugin for Wor
3
  Contributors: formidableforms, sswells, srwells
4
  Tags: forms, contact form, form builder, survey, free, form maker, form creator, paypal form, paypal, stripe, stripe form, aweber, aweber form, getresponse, getresponse form, calculator, price calculator, quote form, contact button, form manager, Akismet, payment form, survey form, donation form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form, constant contact, mailpoet, active campaign, salesforce, hubspot, campaign monitor, quiz builder, quiz, feedback form, mailchimp form
5
  Requires at least: 5.2
6
- Tested up to: 5.9.2
7
  Requires PHP: 5.6
8
- Stable tag: 5.2.03
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
11
 
@@ -438,6 +438,10 @@ Using our Zapier integration, you can easily connect Formidable with over 1000+
438
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
439
 
440
  == Changelog ==
 
 
 
 
441
  = 5.2.03 =
442
  * New: Updated how unique field and form keys are generated for shorter unique keys.
443
  * New: Added a new frm_unique_field_key_separator filter for unique field keys.
@@ -450,12 +454,4 @@ See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zap
450
  * Fix: Imported templates with multiple forms were getting imported with the wrong name.
451
  * Fix: Clicking to install a quiz template was copying the NEW html into the form name input.
452
 
453
- = 5.2.02 =
454
- * Updated Bootstrap to version 4.6.1.
455
- * New: Name fields will be automatically used to define entry names if available.
456
- * New: Added setting to update privileged access message.
457
- * Fix: Section icon dropdown toggles were not displaying updated changes.
458
- * Fix: Prevent a PHP 8.1 deprecation message where null was being passed to substr.
459
- * Fix: Name fields with no descriptions were still displaying bottom margins.
460
-
461
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
3
  Contributors: formidableforms, sswells, srwells
4
  Tags: forms, contact form, form builder, survey, free, form maker, form creator, paypal form, paypal, stripe, stripe form, aweber, aweber form, getresponse, getresponse form, calculator, price calculator, quote form, contact button, form manager, Akismet, payment form, survey form, donation form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form, constant contact, mailpoet, active campaign, salesforce, hubspot, campaign monitor, quiz builder, quiz, feedback form, mailchimp form
5
  Requires at least: 5.2
6
+ Tested up to: 5.9.3
7
  Requires PHP: 5.6
8
+ Stable tag: 5.2.04
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
11
 
438
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
439
 
440
  == Changelog ==
441
+ = 5.2.04 =
442
+ * New: Defined field option data will no longer be sent to Akismet, to help improve accuracy with Akismet API.
443
+ * Fix: Updated Elementor widget so it no longer uses the deprecated _register_controls method.
444
+
445
  = 5.2.03 =
446
  * New: Updated how unique field and form keys are generated for shorter unique keys.
447
  * New: Added a new frm_unique_field_key_separator filter for unique field keys.
454
  * Fix: Imported templates with multiple forms were getting imported with the wrong name.
455
  * Fix: Clicking to install a quiz template was copying the NEW html into the form name input.
456
 
 
 
 
 
 
 
 
 
457
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>