Contact Form by WPForms – Drag & Drop Form Builder for WordPress - Version 1.5.2.3

Version Description

  • Fixed: PHP error if checkbox field is empty when form is submitted.
Download this release

Release Info

Developer jaredatch
Plugin Icon 128x128 Contact Form by WPForms – Drag & Drop Form Builder for WordPress
Version 1.5.2.3
Comparing to
See all releases

Code changes from version 1.5.2.2 to 1.5.2.3

assets/js/wpforms.js CHANGED
@@ -725,7 +725,7 @@
725
  $reCAPTCHA = $form.find( '.wpforms-recaptcha-container' ),
726
  pageScroll = false;
727
 
728
- // Page scroll
729
  // TODO: cleanup this BC with wpform_pageScroll.
730
  if ( false === window.wpforms_pageScroll ) {
731
  pageScroll = false;
@@ -735,18 +735,18 @@
735
  pageScroll = 75;
736
  }
737
 
738
- // Toggling between pages
739
  if ( 'next' === action ) {
740
 
741
- // Validate
742
  if ( typeof $.fn.validate !== 'undefined' ) {
743
- $page.find( 'input.wpforms-field-required, select.wpforms-field-required, textarea.wpforms-field-required, .wpforms-field-required input, .wpforms-field-file-upload input' ).each( function( index, el ) {
744
  if ( ! $( el ).valid() ) {
745
  valid = false;
746
  }
747
  } );
748
 
749
- // Scroll to first/top error on page
750
  var $topError = $page.find( '.wpforms-error' ).first();
751
  if ( $topError.length ) {
752
  $( 'html, body' ).animate( {
@@ -757,7 +757,7 @@
757
  }
758
  }
759
 
760
- // Move to next page
761
  if ( valid ) {
762
  page2 = next;
763
  $page.hide();
@@ -769,7 +769,7 @@
769
  }
770
  if ( pageScroll ) {
771
 
772
- // Scroll to top of the form
773
  $( 'html, body' ).animate( {
774
  scrollTop: $form.offset().top - pageScroll,
775
  }, 1000 );
@@ -778,7 +778,7 @@
778
  }
779
  } else if ( 'prev' === action ) {
780
 
781
- // Move to prev page
782
  page2 = prev;
783
  $page.hide();
784
  $form.find( '.wpforms-page-' + prev ).show();
@@ -786,7 +786,7 @@
786
  $submit.hide();
787
  if ( pageScroll ) {
788
 
789
- // Scroll to top of the form
790
  $( 'html, body' ).animate( {
791
  scrollTop: $form.offset().top - pageScroll,
792
  }, 1000 );
@@ -827,7 +827,7 @@
827
  /**
828
  * OptinMonster compatibility.
829
  *
830
- * Re-initialize after OptinMonster loads to accomodate changes that
831
  * have occurred to the DOM.
832
  *
833
  * @since 1.5.0
725
  $reCAPTCHA = $form.find( '.wpforms-recaptcha-container' ),
726
  pageScroll = false;
727
 
728
+ // Page scroll.
729
  // TODO: cleanup this BC with wpform_pageScroll.
730
  if ( false === window.wpforms_pageScroll ) {
731
  pageScroll = false;
735
  pageScroll = 75;
736
  }
737
 
738
+ // Toggling between pages.
739
  if ( 'next' === action ) {
740
 
741
+ // Validate.
742
  if ( typeof $.fn.validate !== 'undefined' ) {
743
+ $page.find( ':input' ).each( function( index, el ) {
744
  if ( ! $( el ).valid() ) {
745
  valid = false;
746
  }
747
  } );
748
 
749
+ // Scroll to first/top error on page.
750
  var $topError = $page.find( '.wpforms-error' ).first();
751
  if ( $topError.length ) {
752
  $( 'html, body' ).animate( {
757
  }
758
  }
759
 
760
+ // Move to next page.
761
  if ( valid ) {
762
  page2 = next;
763
  $page.hide();
769
  }
770
  if ( pageScroll ) {
771
 
772
+ // Scroll to top of the form.
773
  $( 'html, body' ).animate( {
774
  scrollTop: $form.offset().top - pageScroll,
775
  }, 1000 );
778
  }
779
  } else if ( 'prev' === action ) {
780
 
781
+ // Move to prev page.
782
  page2 = prev;
783
  $page.hide();
784
  $form.find( '.wpforms-page-' + prev ).show();
786
  $submit.hide();
787
  if ( pageScroll ) {
788
 
789
+ // Scroll to top of the form.
790
  $( 'html, body' ).animate( {
791
  scrollTop: $form.offset().top - pageScroll,
792
  }, 1000 );
827
  /**
828
  * OptinMonster compatibility.
829
  *
830
+ * Re-initialize after OptinMonster loads to accommodate changes that
831
  * have occurred to the DOM.
832
  *
833
  * @since 1.5.0
changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 1.5.2.2 =
4
  - Fixed: PHP notice/warnings from undefined constant (typo).
5
 
1
  == Changelog ==
2
 
3
+ = 1.5.2.3 =
4
+ - Fixed: PHP error if checkbox field is empty when form is submitted.
5
+
6
  = 1.5.2.2 =
7
  - Fixed: PHP notice/warnings from undefined constant (typo).
8
 
includes/admin/class-settings.php CHANGED
@@ -409,7 +409,7 @@ class WPForms_Settings {
409
  'validation' => array(
410
  'validation-heading' => array(
411
  'id' => 'validation-heading',
412
- 'content' => '<h4>' . esc_html__( 'Validation Messages', 'wpforms-lite' ) . '</h4><p>' . esc_html__( 'These messages are displayed to the user as they fill out a form in real-time.', 'wpforms-lite' ) . '</p>',
413
  'type' => 'content',
414
  'no_label' => true,
415
  'class' => array( 'section-heading' ),
409
  'validation' => array(
410
  'validation-heading' => array(
411
  'id' => 'validation-heading',
412
+ 'content' => '<h4>' . esc_html__( 'Validation Messages', 'wpforms-lite' ) . '</h4><p>' . esc_html__( 'These messages are displayed to the users as they fill out a form in real-time.', 'wpforms-lite' ) . '</p>',
413
  'type' => 'content',
414
  'no_label' => true,
415
  'class' => array( 'section-heading' ),
includes/fields/class-checkbox.php CHANGED
@@ -532,6 +532,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
532
  */
533
  public function validate( $field_id, $field_submit, $form_data ) {
534
 
 
535
  $form_id = $form_data['id'];
536
  $choice_limit = empty( $form_data['fields'][ $field_id ]['choice_limit'] ) ? 0 : (int) $form_data['fields'][ $field_id ]['choice_limit'];
537
  $count_choices = count( $field_submit );
532
  */
533
  public function validate( $field_id, $field_submit, $form_data ) {
534
 
535
+ $field_submit = (array) $field_submit;
536
  $form_id = $form_data['id'];
537
  $choice_limit = empty( $form_data['fields'][ $field_id ]['choice_limit'] ) ? 0 : (int) $form_data['fields'][ $field_id ]['choice_limit'];
538
  $count_choices = count( $field_submit );
languages/wpforms-lite.pot CHANGED
@@ -1,13 +1,13 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WPForms Lite 1.5.2.1\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms-lite\n"
5
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
6
  "Language-Team: LANGUAGE <LL@li.org>\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "POT-Creation-Date: 2019-04-11T11:19:57+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.1.0\n"
13
  "X-Domain: wpforms-lite\n"
@@ -1717,7 +1717,7 @@ msgstr ""
1717
 
1718
  #: includes/class-frontend.php:1067
1719
  #: includes/admin/class-settings.php:457
1720
- #: includes/fields/class-checkbox.php:541
1721
  msgid "You have exceeded the number of allowed selections: {#}."
1722
  msgstr ""
1723
 
@@ -4346,7 +4346,7 @@ msgid "Validation Messages"
4346
  msgstr ""
4347
 
4348
  #: includes/admin/class-settings.php:412
4349
- msgid "These messages are displayed to the user as they fill out a form in real-time."
4350
  msgstr ""
4351
 
4352
  #: includes/admin/class-settings.php:419
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WPForms Lite 1.5.2.3\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms-lite\n"
5
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
6
  "Language-Team: LANGUAGE <LL@li.org>\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
+ "POT-Creation-Date: 2019-04-23T13:57:12+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.1.0\n"
13
  "X-Domain: wpforms-lite\n"
1717
 
1718
  #: includes/class-frontend.php:1067
1719
  #: includes/admin/class-settings.php:457
1720
+ #: includes/fields/class-checkbox.php:542
1721
  msgid "You have exceeded the number of allowed selections: {#}."
1722
  msgstr ""
1723
 
4346
  msgstr ""
4347
 
4348
  #: includes/admin/class-settings.php:412
4349
+ msgid "These messages are displayed to the users as they fill out a form in real-time."
4350
  msgstr ""
4351
 
4352
  #: includes/admin/class-settings.php:419
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wpforms, jaredatch, smub, slaFFik
3
  Tags: contact form, contact form plugin, forms, form builder, custom form, contact button, contact me, custom contact form, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
4
  Requires at least: 4.8
5
  Tested up to: 5.1
6
- Stable tag: 1.5.2.2
7
  Requires PHP: 5.3.3
8
  License: GNU General Public License v2.0 or later
9
 
@@ -272,6 +272,9 @@ Syed Balkhi
272
 
273
  == Changelog ==
274
 
 
 
 
275
  = 1.5.2.2 =
276
  - Fixed: PHP notice/warnings from undefined constant (typo).
277
 
3
  Tags: contact form, contact form plugin, forms, form builder, custom form, contact button, contact me, custom contact form, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
4
  Requires at least: 4.8
5
  Tested up to: 5.1
6
+ Stable tag: 1.5.2.3
7
  Requires PHP: 5.3.3
8
  License: GNU General Public License v2.0 or later
9
 
272
 
273
  == Changelog ==
274
 
275
+ = 1.5.2.3 =
276
+ - Fixed: PHP error if checkbox field is empty when form is submitted.
277
+
278
  = 1.5.2.2 =
279
  - Fixed: PHP notice/warnings from undefined constant (typo).
280
 
wpforms.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
6
  * Author: WPForms
7
  * Author URI: https://wpforms.com
8
- * Version: 1.5.2.2
9
  * Text Domain: wpforms-lite
10
  * Domain Path: languages
11
  *
@@ -36,7 +36,7 @@ if ( ! defined( 'ABSPATH' ) ) {
36
 
37
  // Plugin version.
38
  if ( ! defined( 'WPFORMS_VERSION' ) ) {
39
- define( 'WPFORMS_VERSION', '1.5.2.2' );
40
  }
41
 
42
  // Plugin Folder Path.
5
  * Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
6
  * Author: WPForms
7
  * Author URI: https://wpforms.com
8
+ * Version: 1.5.2.3
9
  * Text Domain: wpforms-lite
10
  * Domain Path: languages
11
  *
36
 
37
  // Plugin version.
38
  if ( ! defined( 'WPFORMS_VERSION' ) ) {
39
+ define( 'WPFORMS_VERSION', '1.5.2.3' );
40
  }
41
 
42
  // Plugin Folder Path.