Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms - Version 1.6.6

Version Description

  • Bugfix: Fix the issue with Number and Address part calling an undefined JS method.
  • Bugfix: Fix appearance of international Phone field in various title placement configurations.
Download this release

Release Info

Developer thethemefoundry
Plugin Icon 128x128 Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms
Version 1.6.6
Comparing to
See all releases

Code changes from version 1.6.5 to 1.6.6

assets/css/frontend.css CHANGED
@@ -2431,7 +2431,7 @@ form > .happyforms-message-notices .error {
2431
  padding: 5px 0.5%;
2432
  }
2433
 
2434
- .happyforms-part--phone .happyforms-part__el {
2435
  position: relative;
2436
  }
2437
 
@@ -2520,13 +2520,13 @@ form > .happyforms-message-notices .error {
2520
  line-height: 1;
2521
  font-size: 40px;
2522
  }
2523
- .happyforms-part--phone.happyforms-is-masked .happyforms-part__el>input[type=text] {
2524
  padding-left: 65px;
2525
  }
2526
- .happyforms-part--phone.happyforms-is-masked .happyforms-part__el>input[type=text]:focus~div {
2527
  display: none;
2528
  }
2529
- .happyforms-part--phone.happyforms-is-masked.happyforms-has-country-select .happyforms-part__el>input[type=text] {
2530
  padding-left: 75px;
2531
  }
2532
 
2431
  padding: 5px 0.5%;
2432
  }
2433
 
2434
+ .happyforms-part--phone .happyforms-part-phone-wrap {
2435
  position: relative;
2436
  }
2437
 
2520
  line-height: 1;
2521
  font-size: 40px;
2522
  }
2523
+ .happyforms-part--phone.happyforms-is-masked .happyforms-part-phone-wrap>input[type=text] {
2524
  padding-left: 65px;
2525
  }
2526
+ .happyforms-part--phone.happyforms-is-masked .happyforms-part-phone-wrap>input[type=text]:focus~div {
2527
  display: none;
2528
  }
2529
+ .happyforms-part--phone.happyforms-is-masked.happyforms-has-country-select .happyforms-part-phone-wrap>input[type=text] {
2530
  padding-left: 75px;
2531
  }
2532
 
assets/js/frontend.js CHANGED
@@ -8,16 +8,16 @@
8
  this.$input = $( 'input, textarea, select', this.$el );
9
 
10
  this.$input.on( 'keyup change', this.triggerChange.bind( this ) );
11
- this.$input.on( 'blur', this.adjustPlaceholder.bind( this ) );
12
 
13
- this.adjustPlaceholder();
14
  },
15
 
16
  getType: function() {
17
  return this.type;
18
  },
19
 
20
- adjustPlaceholder: function() {
21
  if ( this.$el.is( '.happyforms-part--label-as_placeholder' ) ) {
22
  if ( this.isFilled() ) {
23
  this.$el.addClass( 'happyforms-part--filled' );
8
  this.$input = $( 'input, textarea, select', this.$el );
9
 
10
  this.$input.on( 'keyup change', this.triggerChange.bind( this ) );
11
+ this.$input.on( 'blur', this.onBlur.bind( this ) );
12
 
13
+ this.onBlur();
14
  },
15
 
16
  getType: function() {
17
  return this.type;
18
  },
19
 
20
+ onBlur: function() {
21
  if ( this.$el.is( '.happyforms-part--label-as_placeholder' ) ) {
22
  if ( this.isFilled() ) {
23
  this.$el.addClass( 'happyforms-part--filled' );
assets/js/frontend/address.js CHANGED
@@ -59,6 +59,8 @@
59
  this.$geolocation.hide();
60
  }
61
  }
 
 
62
  },
63
 
64
  geolocate: function( e ) {
59
  this.$geolocation.hide();
60
  }
61
  }
62
+
63
+ this.onBlur();
64
  },
65
 
66
  geolocate: function( e ) {
assets/js/frontend/number.js CHANGED
@@ -34,6 +34,8 @@
34
  self.cleaveInstances.push( cleave );
35
  } );
36
  }
 
 
37
  },
38
 
39
  reinit: function() {
34
  self.cleaveInstances.push( cleave );
35
  } );
36
  }
37
+
38
+ this.onBlur();
39
  },
40
 
41
  reinit: function() {
assets/js/frontend/phone.js CHANGED
@@ -5,7 +5,7 @@
5
  HappyForms.parts.phone = {
6
  init: function() {
7
  this.type = this.$el.data( 'happyforms-type' );
8
- this.$input = $( '.happyforms-part__el > input', this.$el );
9
  this.masked = this.$el.attr( 'data-mask' );
10
  this.$countryCode = $( 'input[type=hidden]', this.$el );
11
  this.prefix = '';
@@ -20,6 +20,8 @@
20
  this.initCleave();
21
  this.initCountryDropdown();
22
  }
 
 
23
  },
24
 
25
  reinit: function() {
5
  HappyForms.parts.phone = {
6
  init: function() {
7
  this.type = this.$el.data( 'happyforms-type' );
8
+ this.$input = $( '.happyforms-part-phone-wrap > input', this.$el );
9
  this.masked = this.$el.attr( 'data-mask' );
10
  this.$countryCode = $( 'input[type=hidden]', this.$el );
11
  this.prefix = '';
20
  this.initCleave();
21
  this.initCountryDropdown();
22
  }
23
+
24
+ this.onBlur();
25
  },
26
 
27
  reinit: function() {
happyforms.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin URI: https://happyforms.me
6
  * Description: Your friendly drag and drop contact form builder for creating contact forms, lead generation forms, feedback forms, quote forms, survey forms and more!
7
  * Author: The Theme Foundry
8
- * Version: 1.6.5
9
  * Author URI: https://thethemefoundry.com
10
  * Upgrade URI: https://thethemefoundry.com
11
  */
@@ -13,7 +13,7 @@
13
  /**
14
  * The current version of the plugin.
15
  */
16
- define( 'HAPPYFORMS_VERSION', '1.6.5' );
17
 
18
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
19
  /**
5
  * Plugin URI: https://happyforms.me
6
  * Description: Your friendly drag and drop contact form builder for creating contact forms, lead generation forms, feedback forms, quote forms, survey forms and more!
7
  * Author: The Theme Foundry
8
+ * Version: 1.6.6
9
  * Author URI: https://thethemefoundry.com
10
  * Upgrade URI: https://thethemefoundry.com
11
  */
13
  /**
14
  * The current version of the plugin.
15
  */
16
+ define( 'HAPPYFORMS_VERSION', '1.6.6' );
17
 
18
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
19
  /**
inc/templates/parts/frontend-phone.php CHANGED
@@ -5,24 +5,29 @@
5
  <?php endif; ?>
6
 
7
  <div class="happyforms-part__el">
8
- <?php
9
- $code_value = happyforms_get_part_value( $part, $form, 'code' );
10
- $code_value = ( ! empty( $code_value ) ) ? $code_value : $part['mask_phone_country'];
11
- ?>
12
-
13
- <?php do_action( 'happyforms_part_input_before', $part, $form ); ?>
 
14
 
15
- <?php $code_value = ( ! empty( happyforms_get_part_value( $part, $form, 'code' ) ) ) ? happyforms_get_part_value( $part, $form, 'code' ) : $part['mask_phone_country']; ?>
16
- <input type="hidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[code]" value="<?php echo $code_value; ?>" <?php happyforms_the_part_attributes( $part, $form, 'code' ); ?> />
17
- <?php happyforms_the_countries_dropdown( $this, $part, $code_value ); ?>
18
- <input id="<?php happyforms_the_part_id( $part, $form ); ?>" type="text" value="<?php happyforms_the_part_value( $part, $form, 'number' ); ?>" name="<?php happyforms_the_part_name( $part, $form ); ?>[number]" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php if ( 1 === $part['required'] ) : ?>required aria-required="true"<?php endif; ?> <?php happyforms_the_part_attributes( $part, $form, 'number' ); ?> />
19
- <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
20
- <?php happyforms_the_part_label( $part, $form ); ?>
21
- <?php endif; ?>
 
 
22
 
23
- <?php do_action( 'happyforms_part_input_after', $part, $form ); ?>
 
24
 
25
  <?php happyforms_print_part_description( $part ); ?>
 
26
  <?php happyforms_message_notices( happyforms_get_part_name( $part, $form ) ); ?>
27
  </div>
28
  </div>
@@ -31,12 +36,15 @@
31
  <?php if ( 'as_placeholder' !== $part['label_placement'] ) : ?>
32
  <?php happyforms_the_part_confirmation_label( $part, $form ); ?>
33
  <?php endif; ?>
 
34
  <div class="happyforms-part__el">
35
- <?php happyforms_the_countries_dropdown( $this, $part, $code_value ); ?>
36
- <input id="<?php happyforms_the_part_id( $part, $form ); ?>_confirmation" type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>[confirmation]" value="<?php happyforms_the_part_value( $part, $form, 'confirmation' ); ?>" class="happyforms-confirmation-input" <?php if ( 1 === $part['required'] ) : ?>required aria-required="true"<?php endif; ?> <?php happyforms_the_part_attributes( $part, $form, 1 ); ?> />
37
- <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
38
- <?php happyforms_the_part_confirmation_label( $part, $form ); ?>
39
- <?php endif; ?>
 
 
40
  </div>
41
  </div>
42
  <?php endif; ?>
5
  <?php endif; ?>
6
 
7
  <div class="happyforms-part__el">
8
+ <div class="happyforms-part-phone-wrap">
9
+ <?php
10
+ $code_value = happyforms_get_part_value( $part, $form, 'code' );
11
+ $code_value = ( ! empty( $code_value ) ) ? $code_value : $part['mask_phone_country'];
12
+ ?>
13
+
14
+ <?php do_action( 'happyforms_part_input_before', $part, $form ); ?>
15
 
16
+ <?php $code_value = ( ! empty( happyforms_get_part_value( $part, $form, 'code' ) ) ) ? happyforms_get_part_value( $part, $form, 'code' ) : $part['mask_phone_country']; ?>
17
+ <?php if ( 1 === intval( $part['masked'] ) ) : ?>
18
+ <input type="hidden" name="<?php happyforms_the_part_name( $part, $form ); ?>[code]" value="<?php echo $code_value; ?>" <?php happyforms_the_part_attributes( $part, $form, 'code' ); ?> />
19
+ <?php endif; ?>
20
+ <?php happyforms_the_countries_dropdown( $this, $part, $code_value ); ?>
21
+ <input id="<?php happyforms_the_part_id( $part, $form ); ?>" type="text" value="<?php happyforms_the_part_value( $part, $form, 'number' ); ?>" name="<?php happyforms_the_part_name( $part, $form ); ?>[number]" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php if ( 1 === $part['required'] ) : ?>required aria-required="true"<?php endif; ?> <?php happyforms_the_part_attributes( $part, $form, 'number' ); ?> />
22
+ <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
23
+ <?php happyforms_the_part_label( $part, $form ); ?>
24
+ <?php endif; ?>
25
 
26
+ <?php do_action( 'happyforms_part_input_after', $part, $form ); ?>
27
+ </div>
28
 
29
  <?php happyforms_print_part_description( $part ); ?>
30
+
31
  <?php happyforms_message_notices( happyforms_get_part_name( $part, $form ) ); ?>
32
  </div>
33
  </div>
36
  <?php if ( 'as_placeholder' !== $part['label_placement'] ) : ?>
37
  <?php happyforms_the_part_confirmation_label( $part, $form ); ?>
38
  <?php endif; ?>
39
+
40
  <div class="happyforms-part__el">
41
+ <div class="happyforms-part-phone-wrap">
42
+ <?php happyforms_the_countries_dropdown( $this, $part, $code_value ); ?>
43
+ <input id="<?php happyforms_the_part_id( $part, $form ); ?>_confirmation" type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>[confirmation]" value="<?php happyforms_the_part_value( $part, $form, 'confirmation' ); ?>" class="happyforms-confirmation-input" <?php if ( 1 === $part['required'] ) : ?>required aria-required="true"<?php endif; ?> <?php happyforms_the_part_attributes( $part, $form, 1 ); ?> />
44
+ <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
45
+ <?php happyforms_the_part_confirmation_label( $part, $form ); ?>
46
+ <?php endif; ?>
47
+ </div>
48
  </div>
49
  </div>
50
  <?php endif; ?>
languages/happyforms.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the HappyForms package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: HappyForms 1.6.5\n"
6
  "Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
7
- "POT-Creation-Date: 2018-09-25 14:31:50+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the HappyForms package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: HappyForms 1.6.6\n"
6
  "Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
7
+ "POT-Creation-Date: 2018-09-26 13:59:59+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: contact, contact form, email, feedback form, form, form builder, custom fo
5
  Requires at least: 4.8
6
  Tested up to: 4.9.7
7
  Requires PHP: 5.2.4
8
- Stable tag: 1.6.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -79,6 +79,10 @@ Absolutely! HappyForms gets out of the way and is designed to work with any them
79
 
80
  == Changelog ==
81
 
 
 
 
 
82
  = 1.6.5 =
83
  * Bugfix: Dropdown part was not displaying correct values when containing options with numeric values.
84
  * Bugfix: Dropdown part was not submitting default value correctly.
@@ -278,6 +282,9 @@ Absolutely! HappyForms gets out of the way and is designed to work with any them
278
 
279
  == Upgrade Notice ==
280
 
 
 
 
281
  = 1.6.5 =
282
  * Bugfixes.
283
 
5
  Requires at least: 4.8
6
  Tested up to: 4.9.7
7
  Requires PHP: 5.2.4
8
+ Stable tag: 1.6.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.6.6 =
83
+ * Bugfix: Fix the issue with Number and Address part calling an undefined JS method.
84
+ * Bugfix: Fix appearance of international Phone field in various title placement configurations.
85
+
86
  = 1.6.5 =
87
  * Bugfix: Dropdown part was not displaying correct values when containing options with numeric values.
88
  * Bugfix: Dropdown part was not submitting default value correctly.
282
 
283
  == Upgrade Notice ==
284
 
285
+ = 1.6.6 =
286
+ * Bugfixes.
287
+
288
  = 1.6.5 =
289
  * Bugfixes.
290