Formidable Forms – Form Builder for WordPress - Version 4.11.05

Version Description

  • New: Improved support for importing grid and table view content.
  • Fix: The update and preview buttons in the form builder would wrap to two lines for some longer translations including German and Dutch.
Download this release

Release Info

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

Code changes from version 4.11.04 to 4.11.05

classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '4.11.04';
15
 
16
  /**
17
  * @since 1.07.02
@@ -2286,7 +2286,7 @@ class FrmAppHelper {
2286
  }
2287
 
2288
  private static function prepare_action_slashes( $val, $key, &$post_content ) {
2289
- if ( ! isset( $post_content[ $key ] ) ) {
2290
  return;
2291
  }
2292
 
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '4.11.05';
15
 
16
  /**
17
  * @since 1.07.02
2286
  }
2287
 
2288
  private static function prepare_action_slashes( $val, $key, &$post_content ) {
2289
+ if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) {
2290
  return;
2291
  }
2292
 
classes/helpers/FrmXMLHelper.php CHANGED
@@ -778,6 +778,9 @@ class FrmXMLHelper {
778
  $post_id = wp_insert_post( $post );
779
  self::maybe_update_custom_css( $custom_css );
780
  } else {
 
 
 
781
  // Create/update post now
782
  $post_id = wp_insert_post( $post );
783
  }
@@ -812,6 +815,18 @@ class FrmXMLHelper {
812
  return $imported;
813
  }
814
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  private static function populate_post( &$post, $item, $imported ) {
816
  if ( isset( $item->attachment_url ) ) {
817
  $post['attachment_url'] = (string) $item->attachment_url;
@@ -842,6 +857,11 @@ class FrmXMLHelper {
842
  self::maybe_editing_post( $post );
843
  }
844
 
 
 
 
 
 
845
  private static function populate_postmeta( &$post, $meta, $imported ) {
846
  global $frm_duplicate_ids;
847
 
@@ -851,16 +871,16 @@ class FrmXMLHelper {
851
  );
852
 
853
  //switch old form and field ids to new ones
854
- if ( $m['key'] == 'frm_form_id' && isset( $imported['forms'][ (int) $m['value'] ] ) ) {
855
  $m['value'] = $imported['forms'][ (int) $m['value'] ];
856
  } else {
857
  $m['value'] = FrmAppHelper::maybe_json_decode( $m['value'] );
858
 
859
  if ( ! empty( $frm_duplicate_ids ) ) {
860
-
861
- if ( $m['key'] == 'frm_dyncontent' ) {
862
  $m['value'] = FrmFieldsHelper::switch_field_ids( $m['value'] );
863
- } elseif ( $m['key'] == 'frm_options' ) {
864
 
865
  foreach ( array( 'date_field_id', 'edate_field_id' ) as $setting_name ) {
866
  if ( isset( $m['value'][ $setting_name ] ) && is_numeric( $m['value'][ $setting_name ] ) && isset( $frm_duplicate_ids[ $m['value'][ $setting_name ] ] ) ) {
@@ -972,6 +992,10 @@ class FrmXMLHelper {
972
  $v = $field_obj->get_file_id( $v );
973
  }
974
 
 
 
 
 
975
  update_post_meta( $post_id, $k, $v );
976
 
977
  unset( $k, $v );
@@ -1262,12 +1286,8 @@ class FrmXMLHelper {
1262
  public static function cdata( $str ) {
1263
  FrmAppHelper::unserialize_or_decode( $str );
1264
  if ( is_array( $str ) ) {
1265
- if ( isset( $str[0] ) && isset( $str[0]['box'] ) ) {
1266
- $str = maybe_serialize( $str );
1267
- } else {
1268
- $str = json_encode( $str );
1269
- }
1270
- } elseif ( seems_utf8( $str ) == false ) {
1271
  $str = utf8_encode( $str );
1272
  }
1273
 
778
  $post_id = wp_insert_post( $post );
779
  self::maybe_update_custom_css( $custom_css );
780
  } else {
781
+ if ( $post['post_type'] === 'frm_display' ) {
782
+ $post['post_content'] = self::maybe_prepare_json_view_content( $post['post_content'] );
783
+ }
784
  // Create/update post now
785
  $post_id = wp_insert_post( $post );
786
  }
815
  return $imported;
816
  }
817
 
818
+ /**
819
+ * @param string $content
820
+ * @return string
821
+ */
822
+ private static function maybe_prepare_json_view_content( $content ) {
823
+ $maybe_decoded = FrmAppHelper::maybe_json_decode( $content );
824
+ if ( is_array( $maybe_decoded ) && isset( $maybe_decoded[0] ) && isset( $maybe_decoded[0]['box'] ) ) {
825
+ return FrmAppHelper::prepare_and_encode( $maybe_decoded );
826
+ }
827
+ return $content;
828
+ }
829
+
830
  private static function populate_post( &$post, $item, $imported ) {
831
  if ( isset( $item->attachment_url ) ) {
832
  $post['attachment_url'] = (string) $item->attachment_url;
857
  self::maybe_editing_post( $post );
858
  }
859
 
860
+ /**
861
+ * @param array $post
862
+ * @param stdClass $meta
863
+ * @param array $imported
864
+ */
865
  private static function populate_postmeta( &$post, $meta, $imported ) {
866
  global $frm_duplicate_ids;
867
 
871
  );
872
 
873
  //switch old form and field ids to new ones
874
+ if ( 'frm_form_id' === $m['key'] && isset( $imported['forms'][ (int) $m['value'] ] ) ) {
875
  $m['value'] = $imported['forms'][ (int) $m['value'] ];
876
  } else {
877
  $m['value'] = FrmAppHelper::maybe_json_decode( $m['value'] );
878
 
879
  if ( ! empty( $frm_duplicate_ids ) ) {
880
+ if ( 'frm_dyncontent' === $m['key'] ) {
881
+ $m['value'] = self::maybe_prepare_json_view_content( $m['value'] );
882
  $m['value'] = FrmFieldsHelper::switch_field_ids( $m['value'] );
883
+ } elseif ( 'frm_options' === $m['key'] ) {
884
 
885
  foreach ( array( 'date_field_id', 'edate_field_id' ) as $setting_name ) {
886
  if ( isset( $m['value'][ $setting_name ] ) && is_numeric( $m['value'][ $setting_name ] ) && isset( $frm_duplicate_ids[ $m['value'][ $setting_name ] ] ) ) {
992
  $v = $field_obj->get_file_id( $v );
993
  }
994
 
995
+ if ( 'frm_dyncontent' === $k && is_array( $v ) ) {
996
+ $v = json_encode( $v );
997
+ }
998
+
999
  update_post_meta( $post_id, $k, $v );
1000
 
1001
  unset( $k, $v );
1286
  public static function cdata( $str ) {
1287
  FrmAppHelper::unserialize_or_decode( $str );
1288
  if ( is_array( $str ) ) {
1289
+ $str = json_encode( $str );
1290
+ } elseif ( seems_utf8( $str ) === false ) {
 
 
 
 
1291
  $str = utf8_encode( $str );
1292
  }
1293
 
css/frm_admin.css CHANGED
@@ -430,7 +430,8 @@ ul.frm_form_nav > li {
430
  #frm-publishing {
431
  float: right;
432
  margin-top: 15px;
433
- width: 225px;
 
434
  min-height: 10px;
435
  }
436
 
430
  #frm-publishing {
431
  float: right;
432
  margin-top: 15px;
433
+ min-width: 225px;
434
+ max-width: 325px;
435
  min-height: 10px;
436
  }
437
 
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: 4.11.04
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: 4.11.05
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 4.11.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: 2021-07-15T12:46:53+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"
@@ -1756,7 +1756,7 @@ msgstr ""
1756
  #. translators: %s: The field name.
1757
  #: classes/helpers/FrmFieldsHelper.php:167
1758
  #: classes/helpers/FrmFieldsHelper.php:296
1759
- #: classes/helpers/FrmXMLHelper.php:1204
1760
  #: classes/models/fields/FrmFieldType.php:583
1761
  msgid "%s is invalid"
1762
  msgstr ""
@@ -3570,21 +3570,21 @@ msgstr ""
3570
  msgid "Your server is missing the simplexml_import_dom function"
3571
  msgstr ""
3572
 
3573
- #: classes/helpers/FrmXMLHelper.php:1043
3574
  #: classes/views/solutions/_import.php:51
3575
  msgid "Imported"
3576
  msgstr ""
3577
 
3578
- #: classes/helpers/FrmXMLHelper.php:1044
3579
  msgid "Updated"
3580
  msgstr ""
3581
 
3582
- #: classes/helpers/FrmXMLHelper.php:1069
3583
  msgid "Nothing was imported or updated"
3584
  msgstr ""
3585
 
3586
  #. translators: %1$s: Number of items
3587
- #: classes/helpers/FrmXMLHelper.php:1084
3588
  msgid "%1$s Form"
3589
  msgid_plural "%1$s Forms"
3590
  msgstr[0] ""
@@ -3592,7 +3592,7 @@ msgstr[1] ""
3592
 
3593
  #. translators: %1$s: Number of items
3594
  #. translators: %1$s - field type
3595
- #: classes/helpers/FrmXMLHelper.php:1086
3596
  #: classes/models/FrmFormMigrator.php:584
3597
  msgid "%1$s Field"
3598
  msgid_plural "%1$s Fields"
@@ -3600,56 +3600,56 @@ msgstr[0] ""
3600
  msgstr[1] ""
3601
 
3602
  #. translators: %1$s: Number of items
3603
- #: classes/helpers/FrmXMLHelper.php:1088
3604
  msgid "%1$s Entry"
3605
  msgid_plural "%1$s Entries"
3606
  msgstr[0] ""
3607
  msgstr[1] ""
3608
 
3609
  #. translators: %1$s: Number of items
3610
- #: classes/helpers/FrmXMLHelper.php:1090
3611
  msgid "%1$s View"
3612
  msgid_plural "%1$s Views"
3613
  msgstr[0] ""
3614
  msgstr[1] ""
3615
 
3616
  #. translators: %1$s: Number of items
3617
- #: classes/helpers/FrmXMLHelper.php:1092
3618
  msgid "%1$s Post"
3619
  msgid_plural "%1$s Posts"
3620
  msgstr[0] ""
3621
  msgstr[1] ""
3622
 
3623
  #. translators: %1$s: Number of items
3624
- #: classes/helpers/FrmXMLHelper.php:1094
3625
  msgid "%1$s Style"
3626
  msgid_plural "%1$s Styles"
3627
  msgstr[0] ""
3628
  msgstr[1] ""
3629
 
3630
  #. translators: %1$s: Number of items
3631
- #: classes/helpers/FrmXMLHelper.php:1096
3632
  msgid "%1$s Term"
3633
  msgid_plural "%1$s Terms"
3634
  msgstr[0] ""
3635
  msgstr[1] ""
3636
 
3637
  #. translators: %1$s: Number of items
3638
- #: classes/helpers/FrmXMLHelper.php:1098
3639
  msgid "%1$s Form Action"
3640
  msgid_plural "%1$s Form Actions"
3641
  msgstr[0] ""
3642
  msgstr[1] ""
3643
 
3644
- #: classes/helpers/FrmXMLHelper.php:1122
3645
  msgid "Go to imported form"
3646
  msgstr ""
3647
 
3648
- #: classes/helpers/FrmXMLHelper.php:1327
3649
  msgid "Create Posts"
3650
  msgstr ""
3651
 
3652
- #: classes/helpers/FrmXMLHelper.php:1456
3653
  msgid "Email Notification"
3654
  msgstr ""
3655
 
2
  # This file is distributed under the same license as the Formidable Forms plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Formidable Forms 4.11.05\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: 2021-07-28T14:47:57+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"
1756
  #. translators: %s: The field name.
1757
  #: classes/helpers/FrmFieldsHelper.php:167
1758
  #: classes/helpers/FrmFieldsHelper.php:296
1759
+ #: classes/helpers/FrmXMLHelper.php:1228
1760
  #: classes/models/fields/FrmFieldType.php:583
1761
  msgid "%s is invalid"
1762
  msgstr ""
3570
  msgid "Your server is missing the simplexml_import_dom function"
3571
  msgstr ""
3572
 
3573
+ #: classes/helpers/FrmXMLHelper.php:1067
3574
  #: classes/views/solutions/_import.php:51
3575
  msgid "Imported"
3576
  msgstr ""
3577
 
3578
+ #: classes/helpers/FrmXMLHelper.php:1068
3579
  msgid "Updated"
3580
  msgstr ""
3581
 
3582
+ #: classes/helpers/FrmXMLHelper.php:1093
3583
  msgid "Nothing was imported or updated"
3584
  msgstr ""
3585
 
3586
  #. translators: %1$s: Number of items
3587
+ #: classes/helpers/FrmXMLHelper.php:1108
3588
  msgid "%1$s Form"
3589
  msgid_plural "%1$s Forms"
3590
  msgstr[0] ""
3592
 
3593
  #. translators: %1$s: Number of items
3594
  #. translators: %1$s - field type
3595
+ #: classes/helpers/FrmXMLHelper.php:1110
3596
  #: classes/models/FrmFormMigrator.php:584
3597
  msgid "%1$s Field"
3598
  msgid_plural "%1$s Fields"
3600
  msgstr[1] ""
3601
 
3602
  #. translators: %1$s: Number of items
3603
+ #: classes/helpers/FrmXMLHelper.php:1112
3604
  msgid "%1$s Entry"
3605
  msgid_plural "%1$s Entries"
3606
  msgstr[0] ""
3607
  msgstr[1] ""
3608
 
3609
  #. translators: %1$s: Number of items
3610
+ #: classes/helpers/FrmXMLHelper.php:1114
3611
  msgid "%1$s View"
3612
  msgid_plural "%1$s Views"
3613
  msgstr[0] ""
3614
  msgstr[1] ""
3615
 
3616
  #. translators: %1$s: Number of items
3617
+ #: classes/helpers/FrmXMLHelper.php:1116
3618
  msgid "%1$s Post"
3619
  msgid_plural "%1$s Posts"
3620
  msgstr[0] ""
3621
  msgstr[1] ""
3622
 
3623
  #. translators: %1$s: Number of items
3624
+ #: classes/helpers/FrmXMLHelper.php:1118
3625
  msgid "%1$s Style"
3626
  msgid_plural "%1$s Styles"
3627
  msgstr[0] ""
3628
  msgstr[1] ""
3629
 
3630
  #. translators: %1$s: Number of items
3631
+ #: classes/helpers/FrmXMLHelper.php:1120
3632
  msgid "%1$s Term"
3633
  msgid_plural "%1$s Terms"
3634
  msgstr[0] ""
3635
  msgstr[1] ""
3636
 
3637
  #. translators: %1$s: Number of items
3638
+ #: classes/helpers/FrmXMLHelper.php:1122
3639
  msgid "%1$s Form Action"
3640
  msgid_plural "%1$s Form Actions"
3641
  msgstr[0] ""
3642
  msgstr[1] ""
3643
 
3644
+ #: classes/helpers/FrmXMLHelper.php:1146
3645
  msgid "Go to imported form"
3646
  msgstr ""
3647
 
3648
+ #: classes/helpers/FrmXMLHelper.php:1347
3649
  msgid "Create Posts"
3650
  msgstr ""
3651
 
3652
+ #: classes/helpers/FrmXMLHelper.php:1476
3653
  msgid "Email Notification"
3654
  msgstr ""
3655
 
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, 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: 4.7
6
- Tested up to: 5.7.2
7
  Requires PHP: 5.6
8
- Stable tag: 4.11.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
 
@@ -440,6 +440,10 @@ Using our Zapier integration, you can easily connect Formidable with over 1000+
440
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
441
 
442
  == Changelog ==
 
 
 
 
443
  = 4.11.04 =
444
  * New: The first field with an error will now automatically get focus when a form is submitted for better accessibility and improved user experience.
445
  * Fix: The reply to value of an email would default to the admin email instead of the from email when a shortcode with an empty result was used.
@@ -473,7 +477,4 @@ See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zap
473
  * Fix: Conditionals were not properly fading in when the form block was added to a page.
474
  * Fix: Actions would occasionally conflict if multiple were added too quickly.
475
 
476
- = 4.10.02 =
477
- * New: Added support for in-theme previews for more themes including Twenty Twenty, Customizr, and more.
478
-
479
  <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, 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: 4.7
6
+ Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 4.11.05
9
 
10
  The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
11
 
440
  See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
441
 
442
  == Changelog ==
443
+ = 4.11.05 =
444
+ * New: Improved support for importing grid and table view content.
445
+ * Fix: The update and preview buttons in the form builder would wrap to two lines for some longer translations including German and Dutch.
446
+
447
  = 4.11.04 =
448
  * New: The first field with an error will now automatically get focus when a form is submitted for better accessibility and improved user experience.
449
  * Fix: The reply to value of an email would default to the admin email instead of the from email when a shortcode with an empty result was used.
477
  * Fix: Conditionals were not properly fading in when the form block was added to a page.
478
  * Fix: Actions would occasionally conflict if multiple were added too quickly.
479
 
 
 
 
480
  <a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>