Version Description
- Fix: The form builder page wasn't always loading all fields correctly when loaded with ajax.
- New: frm_global_switch_fields and frm_maybe_switch_field_ids hooks for changing field ids in a form action when a form is duplicated.
Download this release
Release Info
Developer | formidableforms |
Plugin | Formidable Forms – Form Builder for WordPress |
Version | 4.09.04 |
Comparing to | |
See all releases |
Code changes from version 4.09.03 to 4.09.04
- classes/helpers/FrmAppHelper.php +1 -1
- classes/models/FrmFormAction.php +19 -1
- formidable.php +1 -1
- js/formidable_admin.js +4 -1
- languages/formidable.pot +9 -9
- readme.txt +5 -8
classes/helpers/FrmAppHelper.php
CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
|
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
-
public static $plug_version = '4.09.
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
+
public static $plug_version = '4.09.04';
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
classes/models/FrmFormAction.php
CHANGED
@@ -129,6 +129,21 @@ class FrmFormAction {
|
|
129 |
self::__construct( $id_base, $name, $action_options, $control_options );
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
/**
|
133 |
* @since 4.0
|
134 |
*/
|
@@ -270,6 +285,7 @@ class FrmFormAction {
|
|
270 |
|
271 |
$action->menu_order = $form_id;
|
272 |
$switch = $this->get_global_switch_fields();
|
|
|
273 |
foreach ( (array) $action->post_content as $key => $val ) {
|
274 |
if ( is_numeric( $val ) && isset( $frm_duplicate_ids[ $val ] ) ) {
|
275 |
$action->post_content[ $key ] = $frm_duplicate_ids[ $val ];
|
@@ -313,7 +329,7 @@ class FrmFormAction {
|
|
313 |
} elseif ( $ck == $subkey && isset( $frm_duplicate_ids[ $cv ] ) ) {
|
314 |
$action[ $ck ] = $frm_duplicate_ids[ $cv ];
|
315 |
} elseif ( $ck == $subkey ) {
|
316 |
-
$action[ $ck ] =
|
317 |
}
|
318 |
}
|
319 |
}
|
@@ -667,6 +683,8 @@ class FrmFormAction {
|
|
667 |
$switch = $this->get_switch_fields();
|
668 |
$switch['conditions'] = array( 'hide_field' );
|
669 |
|
|
|
|
|
670 |
return $switch;
|
671 |
}
|
672 |
|
129 |
self::__construct( $id_base, $name, $action_options, $control_options );
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* Help to switch old field id by new field id for duplicate form
|
134 |
+
*
|
135 |
+
* @param string $action id of the field that needs to be switched
|
136 |
+
*
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
+
public function maybe_switch_field_ids( $action ) {
|
140 |
+
$updated_action = apply_filters( 'frm_maybe_switch_field_ids', $action );
|
141 |
+
if ( $updated_action === $action ) {
|
142 |
+
$updated_action = FrmFieldsHelper::switch_field_ids( $action );
|
143 |
+
}
|
144 |
+
return $updated_action;
|
145 |
+
}
|
146 |
+
|
147 |
/**
|
148 |
* @since 4.0
|
149 |
*/
|
285 |
|
286 |
$action->menu_order = $form_id;
|
287 |
$switch = $this->get_global_switch_fields();
|
288 |
+
|
289 |
foreach ( (array) $action->post_content as $key => $val ) {
|
290 |
if ( is_numeric( $val ) && isset( $frm_duplicate_ids[ $val ] ) ) {
|
291 |
$action->post_content[ $key ] = $frm_duplicate_ids[ $val ];
|
329 |
} elseif ( $ck == $subkey && isset( $frm_duplicate_ids[ $cv ] ) ) {
|
330 |
$action[ $ck ] = $frm_duplicate_ids[ $cv ];
|
331 |
} elseif ( $ck == $subkey ) {
|
332 |
+
$action[ $ck ] = $this->maybe_switch_field_ids( $action[ $ck ] );
|
333 |
}
|
334 |
}
|
335 |
}
|
683 |
$switch = $this->get_switch_fields();
|
684 |
$switch['conditions'] = array( 'hide_field' );
|
685 |
|
686 |
+
$switch = apply_filters( 'frm_global_switch_fields', $switch );
|
687 |
+
|
688 |
return $switch;
|
689 |
}
|
690 |
|
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.09.
|
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.09.04
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
js/formidable_admin.js
CHANGED
@@ -1053,8 +1053,11 @@ function frmAdminBuildJS() {
|
|
1053 |
field = [];
|
1054 |
|
1055 |
addHtmlToField = function( element ) {
|
|
|
1056 |
element.classList.add( 'frm_load_now' );
|
1057 |
-
|
|
|
|
|
1058 |
};
|
1059 |
|
1060 |
nextElement = thisField;
|
1053 |
field = [];
|
1054 |
|
1055 |
addHtmlToField = function( element ) {
|
1056 |
+
var frmHiddenFdata = element.querySelector( '.frm_hidden_fdata' );
|
1057 |
element.classList.add( 'frm_load_now' );
|
1058 |
+
if ( frmHiddenFdata !== null ) {
|
1059 |
+
field.push( frmHiddenFdata.innerHTML );
|
1060 |
+
}
|
1061 |
};
|
1062 |
|
1063 |
nextElement = thisField;
|
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.09.
|
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-01-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.1.0\n"
|
15 |
"X-Domain: formidable\n"
|
@@ -639,31 +639,31 @@ msgstr ""
|
|
639 |
msgid "There are no options for this action."
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: classes/models/FrmFormAction.php:
|
643 |
msgid "Draft is saved"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: classes/models/FrmFormAction.php:
|
647 |
msgid "Entry is created"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: classes/models/FrmFormAction.php:
|
651 |
msgid "Entry is updated"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: classes/models/FrmFormAction.php:
|
655 |
msgid "Entry is deleted"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: classes/models/FrmFormAction.php:
|
659 |
msgid "Entry is imported"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: classes/models/FrmFormAction.php:
|
663 |
msgid "Use Conditional Logic"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: classes/models/FrmFormAction.php:
|
667 |
msgid "Conditional form actions"
|
668 |
msgstr ""
|
669 |
|
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.09.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-01-06T17:11:41+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.1.0\n"
|
15 |
"X-Domain: formidable\n"
|
639 |
msgid "There are no options for this action."
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: classes/models/FrmFormAction.php:846
|
643 |
msgid "Draft is saved"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: classes/models/FrmFormAction.php:847
|
647 |
msgid "Entry is created"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: classes/models/FrmFormAction.php:848
|
651 |
msgid "Entry is updated"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: classes/models/FrmFormAction.php:849
|
655 |
msgid "Entry is deleted"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: classes/models/FrmFormAction.php:850
|
659 |
msgid "Entry is imported"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: classes/models/FrmFormAction.php:860
|
663 |
msgid "Use Conditional Logic"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: classes/models/FrmFormAction.php:867
|
667 |
msgid "Conditional form actions"
|
668 |
msgstr ""
|
669 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: forms, contact form, form builder, survey, form maker, form creator, paypa
|
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.09.
|
9 |
|
10 |
The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
|
11 |
|
@@ -435,6 +435,10 @@ Using our Zapier integration, you can easily connect Formidable with over 1000+
|
|
435 |
See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
|
436 |
|
437 |
== Changelog ==
|
|
|
|
|
|
|
|
|
438 |
= 4.09.03 =
|
439 |
* New: Added frm_run_honeypot hook to turn off honeypot. Return false to disable or 'limit' to hide from screenreader.
|
440 |
* Moved honeypot back to front of form to catch more spam.
|
@@ -454,11 +458,4 @@ See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zap
|
|
454 |
* Fix: Duplicating a closed form action didn't copy correctly.
|
455 |
* Fix: PHP warnings showed on the add-ons page on some sites.
|
456 |
|
457 |
-
= 4.08 =
|
458 |
-
* New: Added confirmation before forms are deleted in bulk.
|
459 |
-
* Allow a value to pass validation if the entered value matches the placeholder setting.
|
460 |
-
* Fix: Email addresses were not being sent to Akismet for logged out users, and resulting in some false positive spam.
|
461 |
-
* Fix: Some sites have been getting duplicate entries days apart. This issue should be fixed.
|
462 |
-
* Fix: Searching when switching between forms no longer triggers the confirmation message when leaving the page.
|
463 |
-
|
464 |
<a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.09.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 |
|
435 |
See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
|
436 |
|
437 |
== Changelog ==
|
438 |
+
= 4.09.04 =
|
439 |
+
* Fix: The form builder page wasn't always loading all fields correctly when loaded with ajax.
|
440 |
+
* New: frm_global_switch_fields and frm_maybe_switch_field_ids hooks for changing field ids in a form action when a form is duplicated.
|
441 |
+
|
442 |
= 4.09.03 =
|
443 |
* New: Added frm_run_honeypot hook to turn off honeypot. Return false to disable or 'limit' to hide from screenreader.
|
444 |
* Moved honeypot back to front of form to catch more spam.
|
458 |
* Fix: Duplicating a closed form action didn't copy correctly.
|
459 |
* Fix: PHP warnings showed on the add-ons page on some sites.
|
460 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
<a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
|