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

Version Description

  • New feature: New "Email display name" control allows for custom email display name in email alerts.
  • Bugfix: Shortcode script was causing issues with Advanced Custom Fields frontend forms.
  • Bugfix: Email confirmation controls were being toggled under wrong conditions.
  • Bugfix: Long Answer field was generating excessive whitespace in emails and dashboard screens.
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.18
Comparing to
See all releases

Code changes from version 1.9.17 to 1.9.18

core/assets/css/customize.css CHANGED
@@ -169,13 +169,19 @@ p.description a {
169
  }
170
 
171
  .customize-control.customize-control-checkbox_dummy label a:after,
172
- .customize-control.customize-control--upsell a:after {
 
173
  content: "\f504";
174
  display: inline-block;
175
  font-family: dashicons;
176
  text-decoration: none;
177
  }
178
 
 
 
 
 
 
179
  #customize-controls span.description {
180
  display: block;
181
  margin-bottom: 10px;
@@ -483,8 +489,17 @@ a.happyforms-form-part-remove:hover {
483
  display: none;
484
  }
485
 
 
 
 
 
 
 
 
 
 
486
  #customize-control-receive_email_alerts.checked ~ .happyforms-nested-settings[data-trigger=receive_email_alerts],
487
- #customize-control-send_confirmation_email.checked ~ .happyforms-nested-settings[data-trigger=send_confirmation_email],
488
  #customize-control-use_html_id.checked ~ .happyforms-nested-settings[data-trigger=use_html_id] {
489
  display: block;
490
  }
@@ -1541,11 +1556,3 @@ ul.happyforms-parts-list li.happyforms-parts-list-item--group .happyforms-parts-
1541
  .min-max-wrapper > *:last-child {
1542
  padding-right: 0;
1543
  }
1544
-
1545
- #customize-control-send_confirmation_email {
1546
- display: none;
1547
- }
1548
-
1549
- .has-email #customize-control-send_confirmation_email {
1550
- display: block;
1551
- }
169
  }
170
 
171
  .customize-control.customize-control-checkbox_dummy label a:after,
172
+ .customize-control.customize-control--upsell a:after,
173
+ .customize-control-email-parts-list_dummy a:after {
174
  content: "\f504";
175
  display: inline-block;
176
  font-family: dashicons;
177
  text-decoration: none;
178
  }
179
 
180
+ .customize-control-email-parts-list_dummy a {
181
+ display: inline-block;
182
+ margin-top: 3px;
183
+ }
184
+
185
  #customize-controls span.description {
186
  display: block;
187
  margin-bottom: 10px;
489
  display: none;
490
  }
491
 
492
+ #customize-control-send_confirmation_email,
493
+ .happyforms-nested-settings[data-trigger=send_confirmation_email] {
494
+ display: none;
495
+ }
496
+
497
+ .has-email #customize-control-send_confirmation_email {
498
+ display: block;
499
+ }
500
+
501
  #customize-control-receive_email_alerts.checked ~ .happyforms-nested-settings[data-trigger=receive_email_alerts],
502
+ .has-email #customize-control-send_confirmation_email.checked ~ .happyforms-nested-settings[data-trigger=send_confirmation_email],
503
  #customize-control-use_html_id.checked ~ .happyforms-nested-settings[data-trigger=use_html_id] {
504
  display: block;
505
  }
1556
  .min-max-wrapper > *:last-child {
1557
  padding-right: 0;
1558
  }
 
 
 
 
 
 
 
 
core/classes/class-form-email.php CHANGED
@@ -39,6 +39,10 @@ class HappyForms_Form_Email {
39
  'default' => 0,
40
  'sanitize' => 'happyforms_sanitize_checkbox',
41
  ),
 
 
 
 
42
  'alert_email_subject' => array(
43
  'default' => __( 'You received a new message', 'happyforms' ),
44
  'sanitize' => 'sanitize_text_field',
@@ -99,6 +103,12 @@ class HappyForms_Form_Email {
99
  'tooltip' => __( 'Add your Bcc email address here to receive a confirmation email for each form response without appearing in the received message header. You can add multiple email addresses by separating each address with a comma.', 'happyforms' ),
100
  'field' => 'email_bccs',
101
  ),
 
 
 
 
 
 
102
  400 => array(
103
  'type' => 'text',
104
  'label' => __( 'Email subject', 'happyforms' ),
39
  'default' => 0,
40
  'sanitize' => 'happyforms_sanitize_checkbox',
41
  ),
42
+ 'alert_email_from_name' => array(
43
+ 'default' => get_bloginfo( 'name' ),
44
+ 'sanitize' => 'sanitize_text_field',
45
+ ),
46
  'alert_email_subject' => array(
47
  'default' => __( 'You received a new message', 'happyforms' ),
48
  'sanitize' => 'sanitize_text_field',
103
  'tooltip' => __( 'Add your Bcc email address here to receive a confirmation email for each form response without appearing in the received message header. You can add multiple email addresses by separating each address with a comma.', 'happyforms' ),
104
  'field' => 'email_bccs',
105
  ),
106
+ 390 => array(
107
+ 'type' => 'text',
108
+ 'label' => __( 'Email display name', 'happyforms' ),
109
+ 'tooltip' => __( 'You will receive an email with this sender name.', 'happyforms' ),
110
+ 'field' => 'alert_email_from_name',
111
+ ),
112
  400 => array(
113
  'type' => 'text',
114
  'label' => __( 'Email subject', 'happyforms' ),
core/classes/class-happyforms-core.php CHANGED
@@ -460,6 +460,10 @@ class HappyForms_Core {
460
  }
461
 
462
  public function mce_external_plugins( $plugins ) {
 
 
 
 
463
  $plugins['happyforms_shortcode'] = happyforms_get_plugin_url() . 'core/assets/js/admin/shortcode.js';
464
 
465
  return $plugins;
460
  }
461
 
462
  public function mce_external_plugins( $plugins ) {
463
+ if ( ! is_admin() ) {
464
+ return $plugins;
465
+ }
466
+
467
  $plugins['happyforms_shortcode'] = happyforms_get_plugin_url() . 'core/assets/js/admin/shortcode.js';
468
 
469
  return $plugins;
core/classes/parts/class-part-multi-line-text.php CHANGED
@@ -302,7 +302,7 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
302
 
303
  public function email_part_value( $value, $message, $part, $form ) {
304
  if ( $this->type === $part['type'] ) {
305
- $value = nl2br( $value );
306
  }
307
 
308
  return $value;
@@ -310,10 +310,10 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
310
 
311
  public function message_part_value( $value, $original_value, $part, $destination ) {
312
  if ( $this->type === $part['type'] ) {
 
 
313
  if ( 'admin-column' === $destination ) {
314
  $value = make_clickable( $value );
315
- } else {
316
- $value = nl2br( $value );
317
  }
318
  }
319
 
302
 
303
  public function email_part_value( $value, $message, $part, $form ) {
304
  if ( $this->type === $part['type'] ) {
305
+ $value = str_replace( "\n", '<br />', $value );
306
  }
307
 
308
  return $value;
310
 
311
  public function message_part_value( $value, $original_value, $part, $destination ) {
312
  if ( $this->type === $part['type'] ) {
313
+ $value = str_replace( "\n", '<br />', $value );
314
+
315
  if ( 'admin-column' === $destination ) {
316
  $value = make_clickable( $value );
 
 
317
  }
318
  }
319
 
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.17
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.17' );
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.18
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.18' );
17
 
18
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
19
  /**
inc/assets/js/customize.js CHANGED
@@ -1592,11 +1592,25 @@
1592
  render: function() {
1593
  classes.views.FormSetup.prototype.render.apply( this, arguments );
1594
 
 
 
 
 
 
 
1595
  if ( this.model.get( 'allow_abandoned_resume' ) ) {
1596
  this.$el.addClass( 'allow-abandoned-resume' );
1597
  }
1598
 
1599
- return this;
 
 
 
 
 
 
 
 
1600
  },
1601
  } );
1602
 
1592
  render: function() {
1593
  classes.views.FormSetup.prototype.render.apply( this, arguments );
1594
 
1595
+ this.applyConditionClasses();
1596
+
1597
+ return this;
1598
+ },
1599
+
1600
+ applyConditionClasses: function() {
1601
  if ( this.model.get( 'allow_abandoned_resume' ) ) {
1602
  this.$el.addClass( 'allow-abandoned-resume' );
1603
  }
1604
 
1605
+ var partClasses = happyForms.form
1606
+ .get( 'parts' )
1607
+ .pluck( 'type' )
1608
+ .map( function( type ) {
1609
+ return 'has-' + type;
1610
+ } )
1611
+ .join( ' ' );
1612
+
1613
+ this.$el.addClass( partClasses );
1614
  },
1615
  } );
1616
 
inc/classes/class-message-controller.php CHANGED
@@ -478,7 +478,7 @@ class HappyForms_Message_Controller {
478
  if ( ! empty( $form['email_recipient'] ) && ! empty( $subject ) ) {
479
  // Compose an email message
480
  $email_message = new HappyForms_Email_Message( $message );
481
- $name = $form['confirmation_email_from_name'];
482
  $to = explode( ',', $form['email_recipient'] );
483
 
484
  $email_message->set_from_name( $name );
478
  if ( ! empty( $form['email_recipient'] ) && ! empty( $subject ) ) {
479
  // Compose an email message
480
  $email_message = new HappyForms_Email_Message( $message );
481
+ $name = $form['alert_email_from_name'];
482
  $to = explode( ',', $form['email_recipient'] );
483
 
484
  $email_message->set_from_name( $name );
inc/templates/customize-controls/email-parts-list-dummy.php CHANGED
@@ -1,4 +1,4 @@
1
- <div class="customize-control" id="customize-control-<?php echo $control['dummy_id']; ?>">
2
  <label for="<?php echo $control['dummy_id']; ?>" class="customize-control-title"><?php echo $control['label']; ?>:</label>
3
  <select id="<?php echo $control['dummy_id']; ?>" disabled>
4
  <%
@@ -8,4 +8,5 @@
8
  <option value="<%= option.id %>" <%= ( 0 === i ) ? 'selected' : '' %>>"<%= option.label %>" <?php _e( 'field', 'happyforms' ); ?></option>
9
  <% } ); %>
10
  </select>
 
11
  </div>
1
+ <div class="customize-control customize-control-email-parts-list_dummy" id="customize-control-<?php echo $control['dummy_id']; ?>">
2
  <label for="<?php echo $control['dummy_id']; ?>" class="customize-control-title"><?php echo $control['label']; ?>:</label>
3
  <select id="<?php echo $control['dummy_id']; ?>" disabled>
4
  <%
8
  <option value="<%= option.id %>" <%= ( 0 === i ) ? 'selected' : '' %>>"<%= option.label %>" <?php _e( 'field', 'happyforms' ); ?></option>
9
  <% } ); %>
10
  </select>
11
+ <a href="https://happyforms.me/upgrade" target="_blank" class="external"><?php _e( 'Upgrade', 'happyforms' ); ?></a>
12
  </div>
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.17\n"
6
  "Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
7
- "POT-Creation-Date: 2020-07-29 09:55:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -212,95 +212,99 @@ msgstr ""
212
  msgid " Copy"
213
  msgstr ""
214
 
215
- #: core/classes/class-form-email.php:43
216
  msgid "You received a new message"
217
  msgstr ""
218
 
219
- #: core/classes/class-form-email.php:63
220
  msgid "We received your message"
221
  msgstr ""
222
 
223
- #: core/classes/class-form-email.php:67
224
  msgid ""
225
  "Your message has been successfully sent. We appreciate you contacting us "
226
  "and we’ll be in touch soon."
227
  msgstr ""
228
 
229
- #: core/classes/class-form-email.php:83
230
  msgid "Receive submission alerts"
231
  msgstr ""
232
 
233
- #: core/classes/class-form-email.php:92 core/templates/admin-tracking.php:15
234
  msgid "Email address"
235
  msgstr ""
236
 
237
- #: core/classes/class-form-email.php:93
238
  msgid ""
239
  "Add your email address here to receive a confirmation email for each form "
240
  "response. You can add multiple email addresses by separating each address "
241
  "with a comma."
242
  msgstr ""
243
 
244
- #: core/classes/class-form-email.php:98
245
  msgid "Email Bcc address"
246
  msgstr ""
247
 
248
- #: core/classes/class-form-email.php:99
249
  msgid ""
250
  "Add your Bcc email address here to receive a confirmation email for each "
251
  "form response without appearing in the received message header. You can "
252
  "add multiple email addresses by separating each address with a comma."
253
  msgstr ""
254
 
255
- #: core/classes/class-form-email.php:104 core/classes/class-form-email.php:138
 
 
 
 
 
 
 
 
256
  msgid "Email subject"
257
  msgstr ""
258
 
259
- #: core/classes/class-form-email.php:105
260
  msgid ""
261
  "Each time a user submits a message, you'll receive an email with this "
262
  "subject."
263
  msgstr ""
264
 
265
- #: core/classes/class-form-email.php:113
266
  msgid "Send confirmation email"
267
  msgstr ""
268
 
269
- #: core/classes/class-form-email.php:122
270
  msgid "From email address"
271
  msgstr ""
272
 
273
- #: core/classes/class-form-email.php:127
274
  msgid "Reply email address"
275
  msgstr ""
276
 
277
- #: core/classes/class-form-email.php:132
278
- msgid "Email display name"
279
- msgstr ""
280
-
281
- #: core/classes/class-form-email.php:133
282
  msgid ""
283
  "If your form contains an email field, users will receive an email with this "
284
  "sender name."
285
  msgstr ""
286
 
287
- #: core/classes/class-form-email.php:139
288
  msgid ""
289
  "If your form contains an email field, users will receive an email with this "
290
  "subject."
291
  msgstr ""
292
 
293
- #: core/classes/class-form-email.php:144
294
  msgid "Email content"
295
  msgstr ""
296
 
297
- #: core/classes/class-form-email.php:145
298
  msgid ""
299
  "If your form contains an email field, users will receive an email with this "
300
  "content."
301
  msgstr ""
302
 
303
- #: core/classes/class-form-email.php:150
304
  msgid "Include submitted values"
305
  msgstr ""
306
 
@@ -367,6 +371,7 @@ msgstr ""
367
  #: core/classes/class-form-setup.php:166
368
  #: core/templates/customize-form-parts-drawer.php:38
369
  #: inc/templates/customize-controls/checkbox_dummy.php:7
 
370
  msgid "Upgrade"
371
  msgstr ""
372
 
@@ -852,26 +857,26 @@ msgstr ""
852
  msgid "Add HappyForms"
853
  msgstr ""
854
 
855
- #: core/classes/class-happyforms-core.php:686
856
  msgid "Overview"
857
  msgstr ""
858
 
859
- #: core/classes/class-happyforms-core.php:696
860
  msgid "Hey 👋 Welcome to your HappyForms Dashboard!"
861
  msgstr ""
862
 
863
- #: core/classes/class-happyforms-core.php:699
864
  msgid ""
865
  "Are you looking for help? Well, we’ve swept the nacho crumbs from our "
866
  "keyboards, refilled our ginger beers and are ready to reply with answers! "
867
  "So, go on, email %s."
868
  msgstr ""
869
 
870
- #: core/classes/class-happyforms-core.php:708
871
  msgid "For more help"
872
  msgstr ""
873
 
874
- #: core/classes/class-happyforms-core.php:710
875
  msgid "Help guide"
876
  msgstr ""
877
 
2
  # This file is distributed under the same license as the HappyForms package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: HappyForms 1.9.18\n"
6
  "Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
7
+ "POT-Creation-Date: 2020-08-11 11:54:04+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
212
  msgid " Copy"
213
  msgstr ""
214
 
215
+ #: core/classes/class-form-email.php:47
216
  msgid "You received a new message"
217
  msgstr ""
218
 
219
+ #: core/classes/class-form-email.php:67
220
  msgid "We received your message"
221
  msgstr ""
222
 
223
+ #: core/classes/class-form-email.php:71
224
  msgid ""
225
  "Your message has been successfully sent. We appreciate you contacting us "
226
  "and we’ll be in touch soon."
227
  msgstr ""
228
 
229
+ #: core/classes/class-form-email.php:87
230
  msgid "Receive submission alerts"
231
  msgstr ""
232
 
233
+ #: core/classes/class-form-email.php:96 core/templates/admin-tracking.php:15
234
  msgid "Email address"
235
  msgstr ""
236
 
237
+ #: core/classes/class-form-email.php:97
238
  msgid ""
239
  "Add your email address here to receive a confirmation email for each form "
240
  "response. You can add multiple email addresses by separating each address "
241
  "with a comma."
242
  msgstr ""
243
 
244
+ #: core/classes/class-form-email.php:102
245
  msgid "Email Bcc address"
246
  msgstr ""
247
 
248
+ #: core/classes/class-form-email.php:103
249
  msgid ""
250
  "Add your Bcc email address here to receive a confirmation email for each "
251
  "form response without appearing in the received message header. You can "
252
  "add multiple email addresses by separating each address with a comma."
253
  msgstr ""
254
 
255
+ #: core/classes/class-form-email.php:108 core/classes/class-form-email.php:142
256
+ msgid "Email display name"
257
+ msgstr ""
258
+
259
+ #: core/classes/class-form-email.php:109
260
+ msgid "You will receive an email with this sender name."
261
+ msgstr ""
262
+
263
+ #: core/classes/class-form-email.php:114 core/classes/class-form-email.php:148
264
  msgid "Email subject"
265
  msgstr ""
266
 
267
+ #: core/classes/class-form-email.php:115
268
  msgid ""
269
  "Each time a user submits a message, you'll receive an email with this "
270
  "subject."
271
  msgstr ""
272
 
273
+ #: core/classes/class-form-email.php:123
274
  msgid "Send confirmation email"
275
  msgstr ""
276
 
277
+ #: core/classes/class-form-email.php:132
278
  msgid "From email address"
279
  msgstr ""
280
 
281
+ #: core/classes/class-form-email.php:137
282
  msgid "Reply email address"
283
  msgstr ""
284
 
285
+ #: core/classes/class-form-email.php:143
 
 
 
 
286
  msgid ""
287
  "If your form contains an email field, users will receive an email with this "
288
  "sender name."
289
  msgstr ""
290
 
291
+ #: core/classes/class-form-email.php:149
292
  msgid ""
293
  "If your form contains an email field, users will receive an email with this "
294
  "subject."
295
  msgstr ""
296
 
297
+ #: core/classes/class-form-email.php:154
298
  msgid "Email content"
299
  msgstr ""
300
 
301
+ #: core/classes/class-form-email.php:155
302
  msgid ""
303
  "If your form contains an email field, users will receive an email with this "
304
  "content."
305
  msgstr ""
306
 
307
+ #: core/classes/class-form-email.php:160
308
  msgid "Include submitted values"
309
  msgstr ""
310
 
371
  #: core/classes/class-form-setup.php:166
372
  #: core/templates/customize-form-parts-drawer.php:38
373
  #: inc/templates/customize-controls/checkbox_dummy.php:7
374
+ #: inc/templates/customize-controls/email-parts-list-dummy.php:11
375
  msgid "Upgrade"
376
  msgstr ""
377
 
857
  msgid "Add HappyForms"
858
  msgstr ""
859
 
860
+ #: core/classes/class-happyforms-core.php:690
861
  msgid "Overview"
862
  msgstr ""
863
 
864
+ #: core/classes/class-happyforms-core.php:700
865
  msgid "Hey 👋 Welcome to your HappyForms Dashboard!"
866
  msgstr ""
867
 
868
+ #: core/classes/class-happyforms-core.php:703
869
  msgid ""
870
  "Are you looking for help? Well, we’ve swept the nacho crumbs from our "
871
  "keyboards, refilled our ginger beers and are ready to reply with answers! "
872
  "So, go on, email %s."
873
  msgstr ""
874
 
875
+ #: core/classes/class-happyforms-core.php:712
876
  msgid "For more help"
877
  msgstr ""
878
 
879
+ #: core/classes/class-happyforms-core.php:714
880
  msgid "Help guide"
881
  msgstr ""
882
 
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.4
7
  Requires PHP: 5.3
8
- Stable tag: 1.9.17
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -97,6 +97,12 @@ Yep! HappyForms free isn't going anywhere but for those looking for even more yo
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
 
100
  = 1.9.17 =
101
  * Improvement: Improved tooltip display with collision detection.
102
 
@@ -638,6 +644,9 @@ Yep! HappyForms free isn't going anywhere but for those looking for even more yo
638
 
639
  == Upgrade Notice ==
640
 
 
 
 
641
  = 1.9.17 =
642
  * Improvements to tooltips.
643
 
5
  Requires at least: 4.8
6
  Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 1.9.18
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.18 =
101
+ * New feature: New "Email display name" control allows for custom email display name in email alerts.
102
+ * Bugfix: Shortcode script was causing issues with Advanced Custom Fields frontend forms.
103
+ * Bugfix: Email confirmation controls were being toggled under wrong conditions.
104
+ * Bugfix: Long Answer field was generating excessive whitespace in emails and dashboard screens.
105
+
106
  = 1.9.17 =
107
  * Improvement: Improved tooltip display with collision detection.
108
 
644
 
645
  == Upgrade Notice ==
646
 
647
+ = 1.9.18 =
648
+ * New "Email display name" control for email confirmations, miscellaneous bugfixes.
649
+
650
  = 1.9.17 =
651
  * Improvements to tooltips.
652