Calculated Fields Form - Version 1.1.77

Version Description

  • Modifies the Managing Fields operations module.
  • Improves the javascript cache module.
  • Fixes minor issues in the DataTable DS Control (Developer and Platinum versions).
  • Implements the addRecord, updateRecord, and deleteRecord methods in the RecordSet DS control (Developer and Platinum versions).
  • Includes the layout attribute in the PDF Generator add-on to generate the PDF in portrait or landscape mode (Platinum version).
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Calculated Fields Form
Version 1.1.77
Comparing to
See all releases

Code changes from version 1.1.76 to 1.1.77

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://cff.dwbooster.com
4
  Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
5
  Requires at least: 3.0.5
6
  Tested up to: 5.9
7
- Stable tag: 1.1.76
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -965,6 +965,14 @@ A: Please, follow the steps below:
965
 
966
  == Changelog ==
967
 
 
 
 
 
 
 
 
 
968
  = 1.1.76 =
969
 
970
  * Includes the operations SHOWFIELD, HIDEFIELD to show/hide fields without disabling them.
@@ -1017,12 +1025,4 @@ A: Please, follow the steps below:
1017
  * Includes a minor modification in template 14.
1018
  * Loads the vendors' scripts in the footer to prevent conflicts with third-party plugins and themes.
1019
  * Modifies the Messages section for filtering by paid entries, includes in the forms lists, the ids of forms with entries associated, even when the forms were deleted, and a button to delete all entries at once (Professional, Developer, and Platinum versions of the plugin)
1020
- * Modifies the recordset fields when loads forms' submissions. For every field, it includes two attributes with the same value, an attribute with the field's name (fieldname#) and another one with the number component of the field's name (#) (Developer and Platinum versions of the plugin)
1021
-
1022
- = 1.1.67 =
1023
-
1024
- * Fixes a conflict with the latest update of Visual Composer.
1025
-
1026
- = 1.1.66 =
1027
-
1028
- * Fixes an issue in the new animation feature.
4
  Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
5
  Requires at least: 3.0.5
6
  Tested up to: 5.9
7
+ Stable tag: 1.1.77
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
965
 
966
  == Changelog ==
967
 
968
+ = 1.1.77 =
969
+
970
+ * Modifies the Managing Fields operations module.
971
+ * Improves the javascript cache module.
972
+ * Fixes minor issues in the DataTable DS Control (Developer and Platinum versions).
973
+ * Implements the addRecord, updateRecord, and deleteRecord methods in the RecordSet DS control (Developer and Platinum versions).
974
+ * Includes the layout attribute in the PDF Generator add-on to generate the PDF in portrait or landscape mode (Platinum version).
975
+
976
  = 1.1.76 =
977
 
978
  * Includes the operations SHOWFIELD, HIDEFIELD to show/hide fields without disabling them.
1025
  * Includes a minor modification in template 14.
1026
  * Loads the vendors' scripts in the footer to prevent conflicts with third-party plugins and themes.
1027
  * Modifies the Messages section for filtering by paid entries, includes in the forms lists, the ids of forms with entries associated, even when the forms were deleted, and a button to delete all entries at once (Professional, Developer, and Platinum versions of the plugin)
1028
+ * Modifies the recordset fields when loads forms' submissions. For every field, it includes two attributes with the same value, an attribute with the field's name (fieldname#) and another one with the number component of the field's name (#) (Developer and Platinum versions of the plugin)
 
 
 
 
 
 
 
 
changelog.txt CHANGED
@@ -1,5 +1,13 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
3
  = 1.1.76 =
4
 
5
  * Includes the operations SHOWFIELD, HIDEFIELD to show/hide fields without disabling them.
@@ -508,19 +516,4 @@
508
 
509
  * Fixes an issue with the Slider controls entered manually.
510
  * Improves the settings of date/time fields.
511
- * Fixes an issue the DATEDIFF operation (Developer and Platinum versions of the CFF)
512
-
513
- = 1.0.450 =
514
-
515
- * Fixes an issue formatting the values in the calculated field.
516
- * Includes the getIndex method in Radio Buttons, checkbox, and DropDown fields.
517
- * Implements the integration between the Calculated Fields From and the Appointment Hour Booking (Platinum version of the CFF)
518
-
519
- = 1.0.449 =
520
-
521
- * Modifies the SUM and CONCATENATE operations for accepting plain objects as arguments.
522
-
523
- = 1.0.448 =
524
-
525
- * Modifies the HTML Content fields.
526
- * Improves the plugin's performance.
1
  == Changelog ==
2
 
3
+ = 1.1.77 =
4
+
5
+ * Modifies the Managing Fields operations module.
6
+ * Improves the javascript cache module.
7
+ * Fixes minor issues in the DataTable DS Control (Developer and Platinum versions).
8
+ * Implements the addRecord, updateRecord, and deleteRecord methods in the RecordSet DS control (Developer and Platinum versions).
9
+ * Includes the layout attribute in the PDF Generator add-on to generate the PDF in portrait or landscape mode (Platinum version).
10
+
11
  = 1.1.76 =
12
 
13
  * Includes the operations SHOWFIELD, HIDEFIELD to show/hide fields without disabling them.
516
 
517
  * Fixes an issue with the Slider controls entered manually.
518
  * Improves the settings of date/time fields.
519
+ * Fixes an issue the DATEDIFF operation (Developer and Platinum versions of the CFF)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cp_calculatedfieldsf_free.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Calculated Fields Form
4
  Plugin URI: https://cff.dwbooster.com
5
  Description: Create forms with field values calculated based in other form field values.
6
- Version: 1.1.76
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
@@ -16,7 +16,7 @@ if(!defined('WP_DEBUG') || true != WP_DEBUG)
16
  }
17
 
18
  // Defining main constants
19
- define('CP_CALCULATEDFIELDSF_VERSION', '1.1.76' );
20
  define('CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
21
  define('CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
22
  define('CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
3
  Plugin Name: Calculated Fields Form
4
  Plugin URI: https://cff.dwbooster.com
5
  Description: Create forms with field values calculated based in other form field values.
6
+ Version: 1.1.77
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
16
  }
17
 
18
  // Defining main constants
19
+ define('CP_CALCULATEDFIELDSF_VERSION', '1.1.77' );
20
  define('CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
21
  define('CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
22
  define('CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
js/fbuilder-pro-public.jquery.js CHANGED
@@ -1,4 +1,4 @@
1
- $.fbuilder['version'] = '1.1.76';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
1
+ $.fbuilder['version'] = '1.1.77';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
js/modules/05_managing_fields/admin/module_admin.js CHANGED
@@ -56,7 +56,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ] = {
56
  {
57
  "value" : "EVALEQUATION",
58
  "code" : "EVALEQUATION(",
59
- "tip" : "<p>Evaluate specific equation. Requires two parameters, the form object and the field name, or the numeric part of the field name. Ex: EVALEQUATION(form, &quot;fieldname1&quot;); or EVALEQUATION(form, 1);</p>"
60
  },
61
  {
62
  "value" : "COPYFIELDVALUE",
56
  {
57
  "value" : "EVALEQUATION",
58
  "code" : "EVALEQUATION(",
59
+ "tip" : "<p>Evaluate a specific equation. It receives two parameters, the field name (or the numeric part of the field name) and the form object. If the form object is missing, the plugin evaluates the equation in the active form or first form on the page. Ex: EVALEQUATION(&quot;fieldname1&quot;, form); or EVALEQUATION(1, form);</p>"
60
  },
61
  {
62
  "value" : "COPYFIELDVALUE",
js/modules/05_managing_fields/public/05_managing_fields.js CHANGED
@@ -70,7 +70,7 @@
70
 
71
  lib.showfield = lib.SHOWFIELD = function( _field, _form )
72
  {
73
- var o = _getForm(_form), f = _getField(_field, _form), j;
74
  if(f)
75
  {
76
  j = f.jQueryRef();
@@ -81,7 +81,7 @@
81
 
82
  lib.hidefield = lib.HIDEFIELD = function( _field, _form )
83
  {
84
- var o = _getForm(_form), f = _getField(_field, _form);
85
  if(f)
86
  {
87
  j = f.jQueryRef();
@@ -105,32 +105,37 @@
105
  fbuilderjQuery.fbuilder.calculator.defaultCalc(f);
106
  };
107
 
108
- lib.EVALEQUATION = lib.evalequation = function(f,e)
109
  {
110
- var c = fbuilderjQuery.fbuilder.calculator, eq, fi, i;
111
- if(typeof e == 'undefined') c.defaultCalc(f);
112
- else
113
- {
114
- if(Number.isInteger(e)) e = 'fieldname'+e;
115
- if('equations' in f)
116
- {
117
- for(i in f.equations)
118
- {
119
- eq = f.equations[i];
120
- fi = eq.identifier;
121
- if(eq.result == e+fi){
122
- c.enqueueEquation(fi, [eq]);
123
- c.processQueue(fi);
124
- return;
125
- }
126
- }
127
- }
128
- }
129
- };
 
 
 
 
 
130
 
131
  lib.COPYFIELDVALUE = lib.copyfieldvalue = function(_field, _form)
132
  {
133
- var o = _getForm(_form), f = _getField(_field, _form), j;
134
  if(f)
135
  {
136
  j = f.jQueryRef().find(':input:eq(0)');
70
 
71
  lib.showfield = lib.SHOWFIELD = function( _field, _form )
72
  {
73
+ var f = _getField(_field, _form), j;
74
  if(f)
75
  {
76
  j = f.jQueryRef();
81
 
82
  lib.hidefield = lib.HIDEFIELD = function( _field, _form )
83
  {
84
+ var f = _getField(_field, _form);
85
  if(f)
86
  {
87
  j = f.jQueryRef();
105
  fbuilderjQuery.fbuilder.calculator.defaultCalc(f);
106
  };
107
 
108
+ lib.EVALEQUATION = lib.evalequation = function( _field, _form )
109
  {
110
+ try
111
+ {
112
+ /* For compatibility with function( _form, _field ) */
113
+ if(typeof _field == 'object' && 'tagName' in _field && _field.tagName == 'FORM')
114
+ [_field, _form] = [_form, _field];
115
+
116
+ var c = fbuilderjQuery.fbuilder.calculator;
117
+
118
+ if(typeof _field == 'undefined') c.defaultCalc(_form);
119
+
120
+ var f = _getField(_field, _form),
121
+ o = f.jQueryRef().closest('form')[0];
122
+
123
+ for(i in o.equations)
124
+ {
125
+ if(o.equations[i].result == f.name){
126
+ c.enqueueEquation(f.form_identifier, [o.equations[i]]);
127
+ c.processQueue(f.form_identifier);
128
+ return;
129
+ }
130
+ }
131
+ }
132
+ catch(err){if('console' in window) console.log(err);}
133
+ };
134
+
135
 
136
  lib.COPYFIELDVALUE = lib.copyfieldvalue = function(_field, _form)
137
  {
138
+ var f = _getField(_field, _form), j;
139
  if(f)
140
  {
141
  j = f.jQueryRef().find(':input:eq(0)');