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

Version Description

  • Bugfix: "Fields Borders & Spacing" "Inner Spacing" control was unresponsive.
  • Improvement: Added "Prefix" control to Email field.
  • Improvement: Better refresh performance of "Fields Labels & Text" "Label display" control.
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.9.25
Comparing to
See all releases

Code changes from version 1.9.24 to 1.9.25

core/assets/css/color.css CHANGED
@@ -809,7 +809,8 @@
809
  color: var(--happyforms-color-error);
810
  }
811
 
812
- .happyforms-styles .happyforms-input-group__suffix button.happyforms-plain-button {
 
813
  font-size: 16px;
814
  font-size: var(--happyforms-part-value-font-size);
815
  color: var(--happyforms-color-part-value);
809
  color: var(--happyforms-color-error);
810
  }
811
 
812
+ .happyforms-styles .happyforms-input-group__suffix button.happyforms-plain-button,
813
+ .happyforms-styles .happyforms-input-group__suffix a.happyforms-plain-button {
814
  font-size: 16px;
815
  font-size: var(--happyforms-part-value-font-size);
816
  color: var(--happyforms-color-part-value);
core/assets/css/layout.css CHANGED
@@ -1258,7 +1258,8 @@ input[type=submit][disabled].happyforms-button--submit {
1258
  position: relative;
1259
  padding: 0 !important;
1260
  }
1261
- .happyforms-input-group__suffix button.happyforms-plain-button {
 
1262
  outline: 0;
1263
  margin: 0;
1264
  padding: 10px 15px;
1258
  position: relative;
1259
  padding: 0 !important;
1260
  }
1261
+ .happyforms-input-group__suffix button.happyforms-plain-button,
1262
+ .happyforms-input-group__suffix a.happyforms-plain-button {
1263
  outline: 0;
1264
  margin: 0;
1265
  padding: 10px 15px;
core/assets/js/parts/part-email.js CHANGED
@@ -20,7 +20,8 @@
20
  this.listenTo( this.model, 'change:confirmation_field_label', this.onConfirmationLabelChange );
21
  this.listenTo( this.model, 'change:confirmation_field_placeholder', this.onConfirmationPlaceholderChange );
22
  this.listenTo( this.model, 'change:autocomplete_domains', this.onAutocompleteDomainsChange );
23
- this.listenTo( this.model, 'change:suffix', this.onEmailSuffixChange );
 
24
  },
25
 
26
  /**
@@ -92,10 +93,13 @@
92
  } );
93
  },
94
 
95
- onEmailSuffixChange: function( model, value ) {
96
  var $autocompleteDomainsControl = $( '[data-bind=autocomplete_domains]', this.$el ).parent();
97
 
98
- if ( value ) {
 
 
 
99
  $autocompleteDomainsControl.hide();
100
  $( '[data-bind=autocomplete_domains]', this.$el ).prop( 'checked', false );
101
  model.set( 'autocomplete_domains', 0 );
20
  this.listenTo( this.model, 'change:confirmation_field_label', this.onConfirmationLabelChange );
21
  this.listenTo( this.model, 'change:confirmation_field_placeholder', this.onConfirmationPlaceholderChange );
22
  this.listenTo( this.model, 'change:autocomplete_domains', this.onAutocompleteDomainsChange );
23
+ this.listenTo( this.model, 'change:prefix', this.onEmailPrefixSuffixChange );
24
+ this.listenTo( this.model, 'change:suffix', this.onEmailPrefixSuffixChange );
25
  },
26
 
27
  /**
93
  } );
94
  },
95
 
96
+ onEmailPrefixSuffixChange: function( model, value ) {
97
  var $autocompleteDomainsControl = $( '[data-bind=autocomplete_domains]', this.$el ).parent();
98
 
99
+ var prefixVal = $( '[data-bind=prefix]', this.$el ).val();
100
+ var suffixVal = $( '[data-bind=suffix]', this.$el ).val();
101
+
102
+ if ( prefixVal || suffixVal ) {
103
  $autocompleteDomainsControl.hide();
104
  $( '[data-bind=autocomplete_domains]', this.$el ).prop( 'checked', false );
105
  model.set( 'autocomplete_domains', 0 );
core/classes/class-happyforms-core.php CHANGED
@@ -490,14 +490,6 @@ class HappyForms_Core {
490
  public function print_frontend_styles( $form ) {
491
  $output = apply_filters( 'happyforms_enqueue_style', true );
492
 
493
- if ( $output && ! $this->frontend_styles ) {
494
- $this->frontend_styles = true;
495
- $url = happyforms_get_frontend_stylesheet_url( 'layout.css' );
496
- ?>
497
- <link rel="stylesheet" property="stylesheet" href="<?php echo $url; ?>" />
498
- <?php
499
- }
500
-
501
  if ( $output && ! $this->frontend_color_styles ) {
502
  $this->frontend_color_styles = true;
503
  $color_url = happyforms_get_frontend_stylesheet_url( 'color.css' );
@@ -506,6 +498,14 @@ class HappyForms_Core {
506
  <?php
507
  }
508
 
 
 
 
 
 
 
 
 
509
  do_action( 'happyforms_print_frontend_styles', $form );
510
  }
511
 
490
  public function print_frontend_styles( $form ) {
491
  $output = apply_filters( 'happyforms_enqueue_style', true );
492
 
 
 
 
 
 
 
 
 
493
  if ( $output && ! $this->frontend_color_styles ) {
494
  $this->frontend_color_styles = true;
495
  $color_url = happyforms_get_frontend_stylesheet_url( 'color.css' );
498
  <?php
499
  }
500
 
501
+ if ( $output && ! $this->frontend_styles ) {
502
+ $this->frontend_styles = true;
503
+ $url = happyforms_get_frontend_stylesheet_url( 'layout.css' );
504
+ ?>
505
+ <link rel="stylesheet" property="stylesheet" href="<?php echo $url; ?>" />
506
+ <?php
507
+ }
508
+
509
  do_action( 'happyforms_print_frontend_styles', $form );
510
  }
511
 
core/classes/class-wp-customize-form-manager.php CHANGED
@@ -29,6 +29,7 @@ class HappyForms_WP_Customize_Form_Manager {
29
  // Ajax callbacks.
30
  add_action( 'wp_ajax_happyforms-update-form', array( $this, 'ajax_update_form' ) );
31
  add_action( 'wp_ajax_happyforms-form-part-add', array( $this, 'ajax_form_part_add' ) );
 
32
  add_action( 'wp_ajax_happyforms-form-fetch-partial-html', array( $this, 'ajax_fetch_partial' ) );
33
  }
34
 
@@ -237,6 +238,40 @@ class HappyForms_WP_Customize_Form_Manager {
237
  exit();
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /**
241
  * Action: output styles for the Customize screen.
242
  *
29
  // Ajax callbacks.
30
  add_action( 'wp_ajax_happyforms-update-form', array( $this, 'ajax_update_form' ) );
31
  add_action( 'wp_ajax_happyforms-form-part-add', array( $this, 'ajax_form_part_add' ) );
32
+ add_action( 'wp_ajax_happyforms-form-parts-add', array( $this, 'ajax_form_parts_add' ) );
33
  add_action( 'wp_ajax_happyforms-form-fetch-partial-html', array( $this, 'ajax_fetch_partial' ) );
34
  }
35
 
238
  exit();
239
  }
240
 
241
+ public function ajax_form_parts_add() {
242
+ if ( ! check_ajax_referer( 'happyforms', 'happyforms-nonce', false ) ) {
243
+ status_header( 400 );
244
+ wp_send_json_error( 'bad_nonce' );
245
+ }
246
+
247
+ if ( ! current_user_can( 'customize' ) ) {
248
+ status_header( 403 );
249
+ wp_send_json_error( 'customize_not_allowed' );
250
+ }
251
+
252
+ if ( ! isset( $_POST['form_id'] ) || ! isset( $_POST['parts'] ) ) {
253
+ status_header( 403 );
254
+ wp_send_json_error( 'Missing data' );
255
+ }
256
+
257
+ $form_data = happyforms_get_form_controller()->get( intval( $_POST['form_id'] ) );
258
+ $parts_data = $_POST['parts'];
259
+ $parts_html = array();
260
+
261
+ foreach( $parts_data as $part_data ) {
262
+ $template = happyforms_get_form_part( $part_data, $form_data );
263
+ $template = stripslashes( $template );
264
+
265
+ ob_start();
266
+ echo( $template );
267
+ $html = ob_get_clean();
268
+
269
+ $parts_html[$part_data['id']] = $html;
270
+ }
271
+
272
+ wp_send_json_success( $parts_html );
273
+ }
274
+
275
  /**
276
  * Action: output styles for the Customize screen.
277
  *
core/classes/parts/class-part-email.php CHANGED
@@ -65,6 +65,10 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
65
  'default' => '',
66
  'sanitize' => 'sanitize_text_field',
67
  ),
 
 
 
 
68
  'suffix' => array(
69
  'default' => '',
70
  'sanitize' => 'sanitize_text_field',
@@ -105,7 +109,7 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
105
  return $part_data;
106
  }
107
 
108
- if ( ! empty( $part_data['suffix'] ) && 1 == $part_data['autocomplete_domains'] ) {
109
  $part_data['autocomplete_domains'] = 0;
110
  }
111
 
@@ -189,6 +193,10 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
189
  $validation_value = $value[0];
190
  $validation_confirmation_value = '';
191
 
 
 
 
 
192
  if ( ! empty( $part['suffix'] ) ) {
193
  $validation_value = "{$validation_value}{$part['suffix']}";
194
  }
@@ -196,6 +204,9 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
196
  if ( isset( $value[1] ) ) {
197
  $validation_confirmation_value = $value[1];
198
 
 
 
 
199
  if ( ! empty( $part['suffix'] ) ) {
200
  $validation_confirmation_value = "{$validation_confirmation_value}{$part['suffix']}";
201
  }
@@ -234,6 +245,9 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
234
 
235
  public function stringify_value( $value, $part, $form ) {
236
  if ( $this->type === $part['type'] ) {
 
 
 
237
  if ( ! empty( $part['suffix'] ) ) {
238
  $value = "{$value}{$part['suffix']}";
239
  }
65
  'default' => '',
66
  'sanitize' => 'sanitize_text_field',
67
  ),
68
+ 'prefix' => array(
69
+ 'default' => '',
70
+ 'sanitize' => 'sanitize_text_field',
71
+ ),
72
  'suffix' => array(
73
  'default' => '',
74
  'sanitize' => 'sanitize_text_field',
109
  return $part_data;
110
  }
111
 
112
+ if ( ! ( empty( $part_data['prefix'] ) && empty( $part_data['suffix'] ) ) && 1 == $part_data['autocomplete_domains'] ) {
113
  $part_data['autocomplete_domains'] = 0;
114
  }
115
 
193
  $validation_value = $value[0];
194
  $validation_confirmation_value = '';
195
 
196
+ if ( ! empty( $part['prefix'] ) ) {
197
+ $validation_value = "{$part['prefix']}{$validation_value}";
198
+ }
199
+
200
  if ( ! empty( $part['suffix'] ) ) {
201
  $validation_value = "{$validation_value}{$part['suffix']}";
202
  }
204
  if ( isset( $value[1] ) ) {
205
  $validation_confirmation_value = $value[1];
206
 
207
+ if ( ! empty( $part['prefix'] ) ) {
208
+ $validation_confirmation_value = "{$part['prefix']}{$validation_confirmation_value}";
209
+ }
210
  if ( ! empty( $part['suffix'] ) ) {
211
  $validation_confirmation_value = "{$validation_confirmation_value}{$part['suffix']}";
212
  }
245
 
246
  public function stringify_value( $value, $part, $form ) {
247
  if ( $this->type === $part['type'] ) {
248
+ if ( ! empty( $part['prefix'] ) ) {
249
+ $value = "{$part['prefix']}{$value}";
250
+ }
251
  if ( ! empty( $part['suffix'] ) ) {
252
  $value = "{$value}{$part['suffix']}";
253
  }
core/templates/admin-tracking.php CHANGED
@@ -9,11 +9,11 @@ $status = $tracking->get_status();
9
  <?php if ( 3 === intval( $status['status'] ) ) {
10
  $tracking->print_template( 'success' );
11
  } else { ?>
12
- <h1><?php _e( 'Add your email to complete setup', 'happyforms' ); ?>&hellip;</h1>
13
- <p class="description"><?php _e( 'Let\'s set up HappyForms! Enter your email below to agree to notification and to share some data about your usage with', 'happyforms' ); ?> <a href="https://thethemefoundry.com" target="_blank">thethemefoundry.com</a>.</p>
14
  <form action="<?php echo esc_attr( $tracking->monitor_action ); ?>" method="post" id="happyforms-tracking">
15
  <input name="<?php echo esc_attr( $tracking->monitor_email_field ); ?>" type="email" placeholder="<?php _e( 'Email address', 'happyforms' ); ?>" required >
16
- <button type="submit" class="button button-primary button-hero button-block"><?php _e( 'Allow and set up HappyForms', 'happyforms' ); ?></button>
17
  </form>
18
  <?php } ?>
19
  </div>
9
  <?php if ( 3 === intval( $status['status'] ) ) {
10
  $tracking->print_template( 'success' );
11
  } else { ?>
12
+ <h1><?php _e( 'Add your email address to complete setup', 'happyforms' ); ?>&hellip;</h1>
13
+ <p class="description"><?php _e( 'Your email address will only ever be used to receive communications from us', 'happyforms' ); ?>.</p>
14
  <form action="<?php echo esc_attr( $tracking->monitor_action ); ?>" method="post" id="happyforms-tracking">
15
  <input name="<?php echo esc_attr( $tracking->monitor_email_field ); ?>" type="email" placeholder="<?php _e( 'Email address', 'happyforms' ); ?>" required >
16
+ <button type="submit" class="button button-primary button-hero button-block"><?php _e( 'Allow and set up', 'happyforms' ); ?></button>
17
  </form>
18
  <?php } ?>
19
  </div>
core/templates/parts/customize-email.php CHANGED
@@ -26,7 +26,7 @@
26
  <div class="happyforms-part-advanced-settings-wrap">
27
  <?php do_action( 'happyforms_part_customize_email_before_advanced_options' ); ?>
28
 
29
- <p style="display: <%= ( instance.suffix.length ) ? 'none' : 'block' %>">
30
  <label>
31
  <input type="checkbox" class="checkbox" value="1" <% if ( instance.autocomplete_domains ) { %>checked="checked"<% } %> data-bind="autocomplete_domains" /> <?php _e( 'Suggest common email domains', 'happyforms' ); ?>
32
  </label>
@@ -47,6 +47,10 @@
47
  </p>
48
  </div>
49
 
 
 
 
 
50
  <p>
51
  <label for="<%= instance.id %>_suffix"><?php _e( 'Suffix', 'happyforms' ); ?></label>
52
  <input type="text" id="<%= instance.id %>_suffix" class="widefat title" value="<%= instance.suffix %>" data-bind="suffix" maxlength="50" />
26
  <div class="happyforms-part-advanced-settings-wrap">
27
  <?php do_action( 'happyforms_part_customize_email_before_advanced_options' ); ?>
28
 
29
+ <p style="display: <%= ( instance.suffix.length || instance.prefix.length ) ? 'none' : 'block' %>">
30
  <label>
31
  <input type="checkbox" class="checkbox" value="1" <% if ( instance.autocomplete_domains ) { %>checked="checked"<% } %> data-bind="autocomplete_domains" /> <?php _e( 'Suggest common email domains', 'happyforms' ); ?>
32
  </label>
47
  </p>
48
  </div>
49
 
50
+ <p>
51
+ <label for="<%= instance.id %>_prefix"><?php _e( 'Prefix', 'happyforms' ); ?></label>
52
+ <input type="text" id="<%= instance.id %>_prefix" class="widefat title" value="<%= instance.prefix %>" data-bind="prefix" maxlength="50" />
53
+ </p>
54
  <p>
55
  <label for="<%= instance.id %>_suffix"><?php _e( 'Suffix', 'happyforms' ); ?></label>
56
  <input type="text" id="<%= instance.id %>_suffix" class="widefat title" value="<%= instance.suffix %>" data-bind="suffix" maxlength="50" />
core/templates/parts/frontend-email.php CHANGED
@@ -1,10 +1,16 @@
1
  <div class="<?php happyforms_the_part_class( $part, $form ); ?>" id="<?php happyforms_the_part_id( $part, $form ); ?>-part" <?php happyforms_the_part_data_attributes( $part, $form ); ?>>
2
  <?php
3
  $autocomplete_domains = ( 1 == $part['autocomplete_domains'] );
 
 
4
  $has_suffix = ( '' !== $part['suffix'] );
5
  $early_label = true;
6
 
7
- if ( $has_suffix ) {
 
 
 
 
8
  $autocomplete_domains = false;
9
  }
10
 
@@ -29,8 +35,13 @@
29
  <?php happyforms_the_part_label( $part, $form ); ?>
30
  <?php endif; ?>
31
  <?php else: ?>
32
- <?php if ( $has_suffix ) : ?>
33
- <div class="happyforms-input-group with-suffix">
 
 
 
 
 
34
  <?php endif; ?>
35
 
36
  <div class="happyforms-input">
@@ -40,10 +51,12 @@
40
  <?php endif; ?>
41
  </div>
42
 
43
- <?php if ( $has_suffix ) : ?>
44
- <div class="happyforms-input-group__suffix">
45
- <span><?php echo $part['suffix']; ?></span>
46
- </div>
 
 
47
 
48
  </div><!-- /.happyforms-input-group -->
49
  <?php endif; ?>
1
  <div class="<?php happyforms_the_part_class( $part, $form ); ?>" id="<?php happyforms_the_part_id( $part, $form ); ?>-part" <?php happyforms_the_part_data_attributes( $part, $form ); ?>>
2
  <?php
3
  $autocomplete_domains = ( 1 == $part['autocomplete_domains'] );
4
+ $input_group = false;
5
+ $has_prefix = ( '' !== $part['prefix'] );
6
  $has_suffix = ( '' !== $part['suffix'] );
7
  $early_label = true;
8
 
9
+ if ( $has_suffix || $has_prefix ) {
10
+ $input_group = true;
11
+ }
12
+
13
+ if ( $has_suffix || $has_prefix ) {
14
  $autocomplete_domains = false;
15
  }
16
 
35
  <?php happyforms_the_part_label( $part, $form ); ?>
36
  <?php endif; ?>
37
  <?php else: ?>
38
+ <?php if ( $input_group ) : ?>
39
+ <div class="happyforms-input-group<?php echo ( $has_prefix ) ? ' with-prefix' : ''; ?><?php echo ( $has_suffix ) ? ' with-suffix': '' ?>">
40
+ <?php if ( $has_prefix ) : ?>
41
+ <div class="happyforms-input-group__prefix">
42
+ <span><?php echo $part['prefix']; ?></span>
43
+ </div>
44
+ <?php endif; ?>
45
  <?php endif; ?>
46
 
47
  <div class="happyforms-input">
51
  <?php endif; ?>
52
  </div>
53
 
54
+ <?php if ( $input_group ) : ?>
55
+ <?php if ( $has_suffix ) : ?>
56
+ <div class="happyforms-input-group__suffix">
57
+ <span><?php echo $part['suffix']; ?></span>
58
+ </div>
59
+ <?php endif; ?>
60
 
61
  </div><!-- /.happyforms-input-group -->
62
  <?php endif; ?>
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: HappyForms
8
- * Version: 1.9.24
9
  * Author URI: https://happyforms.me
10
  * Upgrade URI: https://happyforms.me/upgrade
11
  */
@@ -13,7 +13,7 @@
13
  /**
14
  * The current version of the plugin.
15
  */
16
- define( 'HAPPYFORMS_VERSION', '1.9.24' );
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: HappyForms
8
+ * Version: 1.9.25
9
  * Author URI: https://happyforms.me
10
  * Upgrade URI: https://happyforms.me/upgrade
11
  */
13
  /**
14
  * The current version of the plugin.
15
  */
16
+ define( 'HAPPYFORMS_VERSION', '1.9.25' );
17
 
18
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
19
  /**
inc/assets/js/customize.js CHANGED
@@ -127,7 +127,30 @@
127
  model: function( attrs, options ) {
128
  var model = PartFactory.model( attrs, options );
129
  return model;
130
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  } );
132
 
133
  var PartFactory = {
@@ -1769,15 +1792,11 @@
1769
 
1770
  happyForms.form.get( 'parts' ).forEach( function ( $partModel ) {
1771
  $partModel.set( partAttribute, value );
1772
- $partModel.fetchHtml( function( response ) {
1773
- var data = {
1774
- id: $partModel.get( 'id' ),
1775
- html: response,
1776
- };
1777
 
1778
- happyForms.previewSend( 'happyforms-form-part-refresh', data );
1779
- } );
1780
- });
1781
  },
1782
 
1783
  onFormClassCheckboxChange: function( e ) {
127
  model: function( attrs, options ) {
128
  var model = PartFactory.model( attrs, options );
129
  return model;
130
+ },
131
+
132
+ fetchHtml: function( success ) {
133
+ var data = {
134
+ action: 'happyforms-form-parts-add',
135
+ 'happyforms-nonce': api.settings.nonce.happyforms,
136
+ happyforms: 1,
137
+ wp_customize: 'on',
138
+ form_id: happyForms.form.id,
139
+ parts: this.toJSON(),
140
+ };
141
+
142
+ var request = $.ajax( ajaxurl, {
143
+ type: 'post',
144
+ dataType: 'json',
145
+ data: data
146
+ } );
147
+
148
+ happyForms.previewSend( 'happyforms-form-parts-disable', {
149
+ ids: this.pluck( 'id' ),
150
+ } );
151
+
152
+ request.done( success );
153
+ },
154
  } );
155
 
156
  var PartFactory = {
1792
 
1793
  happyForms.form.get( 'parts' ).forEach( function ( $partModel ) {
1794
  $partModel.set( partAttribute, value );
1795
+ } );
 
 
 
 
1796
 
1797
+ happyForms.form.get( 'parts' ).fetchHtml( function( response ) {
1798
+ happyForms.previewSend( 'happyforms-form-parts-refresh', response );
1799
+ } );
1800
  },
1801
 
1802
  onFormClassCheckboxChange: function( e ) {
inc/assets/js/preview.js CHANGED
@@ -54,6 +54,22 @@
54
  $refreshedPart.trigger( 'happyforms.attach' );
55
  }
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  handlers.partialHtmlFetch = function( e ) {
58
  var $partial = $( e.selector );
59
  var context = parent.happyForms.previewer;
@@ -88,6 +104,13 @@
88
  $part.addClass( 'unloading' );
89
  }
90
 
 
 
 
 
 
 
 
91
  handlers.formPartRemove = function( id ) {
92
  var $part = handlers.getPart( id );
93
  $part.trigger( 'happyforms.detach' );
@@ -221,7 +244,9 @@
221
  api.preview.bind( 'happyforms-form-part-remove', handlers.formPartRemove );
222
  api.preview.bind( 'happyforms-form-parts-sort', handlers.formPartsSort );
223
  api.preview.bind( 'happyforms-form-part-refresh', handlers.formPartRefresh );
 
224
  api.preview.bind( 'happyforms-form-part-disable', handlers.formPartDisable );
 
225
  api.preview.bind( 'happyforms-form-partial-html-fetch', handlers.partialHtmlFetch );
226
  api.preview.bind( 'happyforms-form-partial-dom-update', handlers.partialDomUpdate );
227
  api.preview.bind( 'happyforms-form-partial-disable', handlers.partialDisable );
54
  $refreshedPart.trigger( 'happyforms.attach' );
55
  }
56
 
57
+ handlers.formPartsRefresh = function( e ) {
58
+ for( var id in e.data ) {
59
+ var html = e.data[id];
60
+ var $part = handlers.getPart( id );
61
+ var $next = $part.next();
62
+ var $refreshedPart = $( html );
63
+
64
+ $part.trigger( 'happyforms.detach' );
65
+ $part.remove();
66
+ $next.before( $refreshedPart );
67
+ $refreshedPart.prepend( $( $pencil ) );
68
+ HappyForms.wrapPart( $refreshedPart, $form );
69
+ $refreshedPart.trigger( 'happyforms.attach' );
70
+ }
71
+ }
72
+
73
  handlers.partialHtmlFetch = function( e ) {
74
  var $partial = $( e.selector );
75
  var context = parent.happyForms.previewer;
104
  $part.addClass( 'unloading' );
105
  }
106
 
107
+ handlers.formPartsDisable = function( e ) {
108
+ e.ids.forEach( function( id ) {
109
+ var $part = handlers.getPart( id );
110
+ $part.addClass( 'unloading' );
111
+ } );
112
+ }
113
+
114
  handlers.formPartRemove = function( id ) {
115
  var $part = handlers.getPart( id );
116
  $part.trigger( 'happyforms.detach' );
244
  api.preview.bind( 'happyforms-form-part-remove', handlers.formPartRemove );
245
  api.preview.bind( 'happyforms-form-parts-sort', handlers.formPartsSort );
246
  api.preview.bind( 'happyforms-form-part-refresh', handlers.formPartRefresh );
247
+ api.preview.bind( 'happyforms-form-parts-refresh', handlers.formPartsRefresh );
248
  api.preview.bind( 'happyforms-form-part-disable', handlers.formPartDisable );
249
+ api.preview.bind( 'happyforms-form-parts-disable', handlers.formPartsDisable );
250
  api.preview.bind( 'happyforms-form-partial-html-fetch', handlers.partialHtmlFetch );
251
  api.preview.bind( 'happyforms-form-partial-dom-update', handlers.partialDomUpdate );
252
  api.preview.bind( 'happyforms-form-partial-disable', handlers.partialDisable );
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.9.24\n"
6
  "Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
7
- "POT-Creation-Date: 2020-10-30 15:03:52+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -987,58 +987,58 @@ msgstr ""
987
  msgid "This message is too short"
988
  msgstr ""
989
 
990
- #: core/classes/class-wp-customize-form-manager.php:165
991
  msgid "Form saved 👏"
992
  msgstr ""
993
 
994
- #: core/classes/class-wp-customize-form-manager.php:166
995
  msgid "There are two ways to embed your form. Here goes…"
996
  msgstr ""
997
 
998
- #: core/classes/class-wp-customize-form-manager.php:167
999
  msgid "Add HappyForms to your page or post"
1000
  msgstr ""
1001
 
1002
- #: core/classes/class-wp-customize-form-manager.php:168
1003
  msgid "In your Edit Post / Edit Page screen, click Add Block."
1004
  msgstr ""
1005
 
1006
- #: core/classes/class-wp-customize-form-manager.php:168
1007
  msgid "Select the HappyForms content block."
1008
  msgstr ""
1009
 
1010
- #: core/classes/class-wp-customize-form-manager.php:168
1011
- #: core/classes/class-wp-customize-form-manager.php:173
1012
  msgid "Select a form in the Form dropdown."
1013
  msgstr ""
1014
 
1015
- #: core/classes/class-wp-customize-form-manager.php:168
1016
  msgid "That's it! You'll see a basic preview of your form in the editor."
1017
  msgstr ""
1018
 
1019
- #: core/classes/class-wp-customize-form-manager.php:169
1020
  msgid "Use HappyForms in a widget area"
1021
  msgstr ""
1022
 
1023
- #: core/classes/class-wp-customize-form-manager.php:171
1024
  msgid "Head over to Appearance &rarr; <a href=\"%s\">Widgets</a> screen."
1025
  msgstr ""
1026
 
1027
- #: core/classes/class-wp-customize-form-manager.php:172
1028
  msgid "Drag the HappyForms widget to your sidebar."
1029
  msgstr ""
1030
 
1031
- #: core/classes/class-wp-customize-form-manager.php:174
1032
  msgid "All done!"
1033
  msgstr ""
1034
 
1035
- #: core/classes/class-wp-customize-form-manager.php:176
1036
  msgid ""
1037
  "Still have questions? Head over to our <a href=\"%s\" "
1038
  "target=\"_blank\">help guide</a>."
1039
  msgstr ""
1040
 
1041
- #: core/classes/class-wp-customize-form-manager.php:183
1042
  msgid ""
1043
  "Form saved. You can add this form to any Page, Post and Widget area. Have "
1044
  "questions? <a href=\"%s\" target=\"_blank\">Ask for help in our support "
@@ -2921,17 +2921,15 @@ msgid "Insert"
2921
  msgstr ""
2922
 
2923
  #: core/templates/admin-tracking.php:12
2924
- msgid "Add your email to complete setup"
2925
  msgstr ""
2926
 
2927
  #: core/templates/admin-tracking.php:13
2928
- msgid ""
2929
- "Let's set up HappyForms! Enter your email below to agree to notification "
2930
- "and to share some data about your usage with"
2931
  msgstr ""
2932
 
2933
  #: core/templates/admin-tracking.php:16
2934
- msgid "Allow and set up HappyForms"
2935
  msgstr ""
2936
 
2937
  #: core/templates/admin-tracking.php:23
@@ -3133,7 +3131,7 @@ msgid "Choices width"
3133
  msgstr ""
3134
 
3135
  #: core/templates/parts/customize-checkbox.php:86
3136
- #: core/templates/parts/customize-email.php:60
3137
  #: core/templates/parts/customize-multi-line-text.php:69
3138
  #: core/templates/parts/customize-number.php:81
3139
  #: core/templates/parts/customize-radio.php:67
@@ -3168,6 +3166,12 @@ msgid "'Confirmation' placeholder"
3168
  msgstr ""
3169
 
3170
  #: core/templates/parts/customize-email.php:51
 
 
 
 
 
 
3171
  #: core/templates/parts/customize-number.php:74
3172
  #: core/templates/parts/customize-single-line-text.php:35
3173
  msgid "Suffix"
@@ -3225,11 +3229,6 @@ msgstr ""
3225
  msgid "Decimal"
3226
  msgstr ""
3227
 
3228
- #: core/templates/parts/customize-number.php:70
3229
- #: core/templates/parts/customize-single-line-text.php:30
3230
- msgid "Prefix"
3231
- msgstr ""
3232
-
3233
  #: core/templates/parts/customize-select.php:52
3234
  msgid "Make searchable"
3235
  msgstr ""
2
  # This file is distributed under the same license as the HappyForms package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: HappyForms 1.9.25\n"
6
  "Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
7
+ "POT-Creation-Date: 2020-11-13 13:48:14+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
987
  msgid "This message is too short"
988
  msgstr ""
989
 
990
+ #: core/classes/class-wp-customize-form-manager.php:166
991
  msgid "Form saved 👏"
992
  msgstr ""
993
 
994
+ #: core/classes/class-wp-customize-form-manager.php:167
995
  msgid "There are two ways to embed your form. Here goes…"
996
  msgstr ""
997
 
998
+ #: core/classes/class-wp-customize-form-manager.php:168
999
  msgid "Add HappyForms to your page or post"
1000
  msgstr ""
1001
 
1002
+ #: core/classes/class-wp-customize-form-manager.php:169
1003
  msgid "In your Edit Post / Edit Page screen, click Add Block."
1004
  msgstr ""
1005
 
1006
+ #: core/classes/class-wp-customize-form-manager.php:169
1007
  msgid "Select the HappyForms content block."
1008
  msgstr ""
1009
 
1010
+ #: core/classes/class-wp-customize-form-manager.php:169
1011
+ #: core/classes/class-wp-customize-form-manager.php:174
1012
  msgid "Select a form in the Form dropdown."
1013
  msgstr ""
1014
 
1015
+ #: core/classes/class-wp-customize-form-manager.php:169
1016
  msgid "That's it! You'll see a basic preview of your form in the editor."
1017
  msgstr ""
1018
 
1019
+ #: core/classes/class-wp-customize-form-manager.php:170
1020
  msgid "Use HappyForms in a widget area"
1021
  msgstr ""
1022
 
1023
+ #: core/classes/class-wp-customize-form-manager.php:172
1024
  msgid "Head over to Appearance &rarr; <a href=\"%s\">Widgets</a> screen."
1025
  msgstr ""
1026
 
1027
+ #: core/classes/class-wp-customize-form-manager.php:173
1028
  msgid "Drag the HappyForms widget to your sidebar."
1029
  msgstr ""
1030
 
1031
+ #: core/classes/class-wp-customize-form-manager.php:175
1032
  msgid "All done!"
1033
  msgstr ""
1034
 
1035
+ #: core/classes/class-wp-customize-form-manager.php:177
1036
  msgid ""
1037
  "Still have questions? Head over to our <a href=\"%s\" "
1038
  "target=\"_blank\">help guide</a>."
1039
  msgstr ""
1040
 
1041
+ #: core/classes/class-wp-customize-form-manager.php:184
1042
  msgid ""
1043
  "Form saved. You can add this form to any Page, Post and Widget area. Have "
1044
  "questions? <a href=\"%s\" target=\"_blank\">Ask for help in our support "
2921
  msgstr ""
2922
 
2923
  #: core/templates/admin-tracking.php:12
2924
+ msgid "Add your email address to complete setup"
2925
  msgstr ""
2926
 
2927
  #: core/templates/admin-tracking.php:13
2928
+ msgid "Your email address will only ever be used to receive communications from us"
 
 
2929
  msgstr ""
2930
 
2931
  #: core/templates/admin-tracking.php:16
2932
+ msgid "Allow and set up"
2933
  msgstr ""
2934
 
2935
  #: core/templates/admin-tracking.php:23
3131
  msgstr ""
3132
 
3133
  #: core/templates/parts/customize-checkbox.php:86
3134
+ #: core/templates/parts/customize-email.php:64
3135
  #: core/templates/parts/customize-multi-line-text.php:69
3136
  #: core/templates/parts/customize-number.php:81
3137
  #: core/templates/parts/customize-radio.php:67
3166
  msgstr ""
3167
 
3168
  #: core/templates/parts/customize-email.php:51
3169
+ #: core/templates/parts/customize-number.php:70
3170
+ #: core/templates/parts/customize-single-line-text.php:30
3171
+ msgid "Prefix"
3172
+ msgstr ""
3173
+
3174
+ #: core/templates/parts/customize-email.php:55
3175
  #: core/templates/parts/customize-number.php:74
3176
  #: core/templates/parts/customize-single-line-text.php:35
3177
  msgid "Suffix"
3229
  msgid "Decimal"
3230
  msgstr ""
3231
 
 
 
 
 
 
3232
  #: core/templates/parts/customize-select.php:52
3233
  msgid "Make searchable"
3234
  msgstr ""
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: 5.5.1
7
  Requires PHP: 5.3
8
- Stable tag: 1.9.24
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -97,6 +97,11 @@ Yep! HappyForms free isn't going anywhere but for those looking for even more yo
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
100
  = 1.9.24 =
101
  * Bugfix: Setting "Label display" to "Hidden" was hiding the form in the block editor.
102
  * Bugfix: A missing trailing slash in Edit Form preview frame was causing issues on some server configurations.
@@ -674,6 +679,9 @@ Yep! HappyForms free isn't going anywhere but for those looking for even more yo
674
 
675
  == Upgrade Notice ==
676
 
 
 
 
677
  = 1.9.24 =
678
  * Minor bugfixes.
679
 
5
  Requires at least: 4.8
6
  Tested up to: 5.5.1
7
  Requires PHP: 5.3
8
+ Stable tag: 1.9.25
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
97
 
98
  == Changelog ==
99
 
100
+ = 1.9.25 =
101
+ * Bugfix: "Fields Borders & Spacing" → "Inner Spacing" control was unresponsive.
102
+ * Improvement: Added "Prefix" control to Email field.
103
+ * Improvement: Better refresh performance of "Fields Labels & Text" → "Label display" control.
104
+
105
  = 1.9.24 =
106
  * Bugfix: Setting "Label display" to "Hidden" was hiding the form in the block editor.
107
  * Bugfix: A missing trailing slash in Edit Form preview frame was causing issues on some server configurations.
679
 
680
  == Upgrade Notice ==
681
 
682
+ = 1.9.25 =
683
+ * New "Prefix" control in Email field, performance improvements and bugfixes.
684
+
685
  = 1.9.24 =
686
  * Minor bugfixes.
687