Calculated Fields Form - Version 1.1.64

Version Description

  • Modifies the NTHROOT operation and implements the PRINTFORM operation for printing the form area.
  • Fixes a minor issue to allow entering negative values as the sliders' default values.
  • Fixes a minor issue in the DataTable DS fields on small screens.
  • Modifies the tags submissiondate_mmddyyyy, submissiondate_ddmmyyyy, currentdate_mmddyyyy, and currentdate_ddmmyyyy to display date only, and include the submissiontime and currenttime tags to include the corresponding time components (Professional, Developer, and Platinum versions of the plugin).
Download this release

Release Info

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

Code changes from version 1.1.63 to 1.1.64

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.63
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -72,7 +72,7 @@ You can clone a sample form to implement your project, or create a new form from
72
  > <strong>Calculated Fields Form Commercial</strong><br />
73
  >The free version of the "Calculated Fields Form" plugin includes only basic functionality. Other distributions (Professional, Developer, and Platinum) are available with advanced functionalities, such as sending notification emails, integration with payment gateways and external services, controls for database's connection (and connection to other data sources), complex operations, and many other features.
74
 
75
- = Features of the Profesional version: =
76
 
77
  * Includes all the features of the free version of the plugin.
78
  * Submit the data collected by the forms and [store it on the website](https://cff.dwbooster.com/documentation#check-submissions) for review.
@@ -298,6 +298,10 @@ One of the most frequent uses of our plugin is for price calculation. When displ
298
 
299
  Note that you can make the "Instruct. Text" fields dependent on the calculated value. This allows you to vary the text displayed to the user depending on the calculated price, as the terms, conditions, or offers often depend on the transaction amount.
300
 
 
 
 
 
301
  == Installation ==
302
 
303
  To install the "Calculated Fields Form" plugin, please follow these steps:
@@ -961,6 +965,13 @@ A: Please, follow the steps below:
961
 
962
  == Changelog ==
963
 
 
 
 
 
 
 
 
964
  = 1.1.63 =
965
 
966
  * Improves the advanced equations editor on mobiles devices.
@@ -1001,8 +1012,4 @@ A: Please, follow the steps below:
1001
 
1002
  * Integrates the Select2 library with the DropDown controls.
1003
  * Modifies iPhone keyboards for decimals.
1004
- * Implements the eWay Payment Gateway integration (Platinum version).
1005
-
1006
- = 1.1.56 =
1007
-
1008
- * Move the getField operation to the root to access it outside the context of the equations.
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.64
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
72
  > <strong>Calculated Fields Form Commercial</strong><br />
73
  >The free version of the "Calculated Fields Form" plugin includes only basic functionality. Other distributions (Professional, Developer, and Platinum) are available with advanced functionalities, such as sending notification emails, integration with payment gateways and external services, controls for database's connection (and connection to other data sources), complex operations, and many other features.
74
 
75
+ = Features of the Professional version: =
76
 
77
  * Includes all the features of the free version of the plugin.
78
  * Submit the data collected by the forms and [store it on the website](https://cff.dwbooster.com/documentation#check-submissions) for review.
298
 
299
  Note that you can make the "Instruct. Text" fields dependent on the calculated value. This allows you to vary the text displayed to the user depending on the calculated price, as the terms, conditions, or offers often depend on the transaction amount.
300
 
301
+ = ClassicPress =
302
+
303
+ This plugin is compatible with [ClassicPress](https://www.classicpress.net/).
304
+
305
  == Installation ==
306
 
307
  To install the "Calculated Fields Form" plugin, please follow these steps:
965
 
966
  == Changelog ==
967
 
968
+ = 1.1.64 =
969
+
970
+ * Modifies the NTHROOT operation and implements the PRINTFORM operation for printing the form area.
971
+ * Fixes a minor issue to allow entering negative values as the sliders' default values.
972
+ * Fixes a minor issue in the DataTable DS fields on small screens.
973
+ * Modifies the tags submissiondate_mmddyyyy, submissiondate_ddmmyyyy, currentdate_mmddyyyy, and currentdate_ddmmyyyy to display date only, and include the submissiontime and currenttime tags to include the corresponding time components (Professional, Developer, and Platinum versions of the plugin).
974
+
975
  = 1.1.63 =
976
 
977
  * Improves the advanced equations editor on mobiles devices.
1012
 
1013
  * Integrates the Select2 library with the DropDown controls.
1014
  * Modifies iPhone keyboards for decimals.
1015
+ * Implements the eWay Payment Gateway integration (Platinum version).
 
 
 
 
changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
3
  = 1.1.63 =
4
 
5
  * Improves the advanced equations editor on mobiles devices.
1
  == Changelog ==
2
 
3
+ = 1.1.64 =
4
+
5
+ * Modifies the NTHROOT operation and implements the PRINTFORM operation for printing the form area.
6
+ * Fixes a minor issue to allow entering negative values as the sliders' default values.
7
+ * Fixes a minor issue in the DataTable DS fields on small screens.
8
+ * Modifies the tags submissiondate_mmddyyyy, submissiondate_ddmmyyyy, currentdate_mmddyyyy, and currentdate_ddmmyyyy to display date only, and include the submissiontime and currenttime tags to include the corresponding time components (Professional, Developer, and Platinum versions of the plugin).
9
+
10
  = 1.1.63 =
11
 
12
  * Improves the advanced equations editor on mobiles devices.
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.63
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.63' );
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.64
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.64' );
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 ) );
css/stylepublic.css CHANGED
@@ -472,7 +472,9 @@
472
  #fbuilder .captcha{
473
  display: none !important;
474
  }
475
- #fbuilder .pbreak{display: block;}
 
 
476
  }
477
 
478
  #fbuilder .discount-container{margin-top:10px;font-weight:bold;}
472
  #fbuilder .captcha{
473
  display: none !important;
474
  }
475
+ /* #fbuilder .pbreak{display: block;} */
476
+ .cff-no-print{display:none !important;visibility:hidden;height:0px;}
477
+ .cff-print{display:block !important;visibility:visible;}
478
  }
479
 
480
  #fbuilder .discount-container{margin-top:10px;font-weight:bold;}
js/fbuilder-pro-public.jquery.js CHANGED
@@ -1,4 +1,4 @@
1
- $.fbuilder['version'] = '1.1.63';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
1
+ $.fbuilder['version'] = '1.1.64';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
js/fields-admin/32_fbuilder.fbutton.js CHANGED
@@ -11,11 +11,12 @@
11
  $.fbuilder.controls[ 'ffields' ].prototype,
12
  {
13
  ftype:"fButton",
14
- sType:"button", // button, reset, calculate
15
  sValue:"button",
16
  sOnclick:"",
17
  sOnmousedown:"",
18
- sLoading: false,
 
19
  userhelp:"A description of the section goes here.",
20
  display:function()
21
  {
@@ -26,6 +27,7 @@
26
  var evt=[
27
  {s:"#sValue",e:"change keyup", l:"sValue"},
28
  {s:"#sLoading",e:"click", l:"sLoading",f:function(el){return el.is(':checked');}},
 
29
  {s:"#sOnclick",e:"change keyup", l:"sOnclick"},
30
  {s:"#sOnmousedown",e:"change keyup", l:"sOnmousedown"},
31
  {
@@ -34,9 +36,12 @@
34
  f:function(e)
35
  {
36
  var v = e.val(),
37
- l = $('#sLoading').closest('div');
 
38
  l.hide();
 
39
  if(v == 'calculate') l.show();
 
40
  return v;
41
  }
42
  }
@@ -49,15 +54,16 @@
49
  },
50
  _showTypeSettings: function()
51
  {
52
- var l = [ 'calculate', 'reset', 'button' ],
53
  r = "", v;
54
  for( var i = 0, h = l.length; i < h; i++ )
55
  {
56
  v = l[ i ];
57
- r += '<label class="column width30"><input type="radio" name="sType" value="' + v + '" ' + ( ( this.sType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
58
  }
59
  r += '<div class="clear"></div>';
60
- r += '<div '+((this.sType != 'calculate') ? 'style="display:none;"' : '')+'><label><input type="checkbox" id="sLoading" ' + ((this.sLoading) ? 'CHECKED' : '') + ' >display "calculation in progress" indicator</label></div>';
 
61
  return '<label>Select button type</label>'+r+'<div class="clearer" />';
62
  },
63
  _showValueSettings: function()
11
  $.fbuilder.controls[ 'ffields' ].prototype,
12
  {
13
  ftype:"fButton",
14
+ sType:"button", // button, reset, calculate, print
15
  sValue:"button",
16
  sOnclick:"",
17
  sOnmousedown:"",
18
+ sLoading:false,
19
+ sMultipage:false,
20
  userhelp:"A description of the section goes here.",
21
  display:function()
22
  {
27
  var evt=[
28
  {s:"#sValue",e:"change keyup", l:"sValue"},
29
  {s:"#sLoading",e:"click", l:"sLoading",f:function(el){return el.is(':checked');}},
30
+ {s:"#sMultipage",e:"click", l:"sMultipage",f:function(el){return el.is(':checked');}},
31
  {s:"#sOnclick",e:"change keyup", l:"sOnclick"},
32
  {s:"#sOnmousedown",e:"change keyup", l:"sOnmousedown"},
33
  {
36
  f:function(e)
37
  {
38
  var v = e.val(),
39
+ l = $('#sLoading').closest('div'),
40
+ p = $('#sMultipage').closest('div');
41
  l.hide();
42
+ p.hide();
43
  if(v == 'calculate') l.show();
44
+ if(v == 'print') p.show();
45
  return v;
46
  }
47
  }
54
  },
55
  _showTypeSettings: function()
56
  {
57
+ var l = [ 'calculate', 'print', 'reset', 'button' ],
58
  r = "", v;
59
  for( var i = 0, h = l.length; i < h; i++ )
60
  {
61
  v = l[ i ];
62
+ r += '<label class="column width20"><input type="radio" name="sType" value="' + v + '" ' + ( ( this.sType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
63
  }
64
  r += '<div class="clear"></div>';
65
+ r += '<div '+((this.sType != 'calculate') ? 'style="display:none;"' : '')+'><label><input type="checkbox" id="sLoading" ' + ((this.sLoading) ? 'CHECKED' : '') + ' > display "calculation in progress" indicator</label></div>';
66
+ r += '<div '+((this.sType != 'print') ? 'style="display:none;"' : '')+'><label><input type="checkbox" id="sMultipage" ' + ((this.sMultipage) ? 'CHECKED' : '') + ' > print all pages in multipage form</label></div>';
67
  return '<label>Select button type</label>'+r+'<div class="clearer" />';
68
  },
69
  _showValueSettings: function()
js/fields-public/02_fbuilder.fslider.js CHANGED
@@ -84,7 +84,7 @@
84
  }
85
  if(!nochange) $('#'+me.name).change();
86
  },
87
- _toNumber:function(n){return (new String(n)).replace(/[^\d\.]/g,'')*1;},
88
  init:function()
89
  {
90
  this.min = (/^\s*$/.test(this.min)) ? 0 : $.trim(this.min);
84
  }
85
  if(!nochange) $('#'+me.name).change();
86
  },
87
+ _toNumber:function(n){return (new String(n)).replace(/[^\-\d\.]/g,'')*1;},
88
  init:function()
89
  {
90
  this.min = (/^\s*$/.test(this.min)) ? 0 : $.trim(this.min);
js/fields-public/32_fbuilder.fbutton.js CHANGED
@@ -7,7 +7,8 @@
7
  sType:"button",
8
  sValue:"button",
9
  sLoading:false,
10
- sOnclick:"",
 
11
  sOnmousedown:"",
12
  userhelp:"A description of the section goes here.",
13
  show:function()
@@ -20,6 +21,10 @@
20
  {
21
  type = 'button';
22
  clss = 'calculate-button';
 
 
 
 
23
  }
24
  else if( this.sType == 'reset' )
25
  {
@@ -95,6 +100,11 @@
95
  );
96
  }
97
  eval(me.sOnclick);
 
 
 
 
 
98
  }
99
  );
100
  }
7
  sType:"button",
8
  sValue:"button",
9
  sLoading:false,
10
+ sMultipage:false,
11
+ sOnclick:"",
12
  sOnmousedown:"",
13
  userhelp:"A description of the section goes here.",
14
  show:function()
21
  {
22
  type = 'button';
23
  clss = 'calculate-button';
24
+ }
25
+ if( this.sType == 'print' )
26
+ {
27
+ type = 'button';
28
  }
29
  else if( this.sType == 'reset' )
30
  {
100
  );
101
  }
102
  eval(me.sOnclick);
103
+ if(me.sType == 'print')
104
+ {
105
+ fbuilderjQuery.fbuilder.currentFormId = f.attr('id');
106
+ PRINTFORM(me.sMultipage);
107
+ }
108
  }
109
  );
110
  }
js/modules/01_mathematical_logical/public/module_public.js CHANGED
@@ -210,7 +210,8 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
210
  {
211
  window.NTHROOT = window.nthroot = function(a,b)
212
  {
213
- return POW(a, 1/b);
 
214
  };
215
  } // End if window.NTHROOT
216
 
210
  {
211
  window.NTHROOT = window.nthroot = function(a,b)
212
  {
213
+ var n = (a<0 && b%2 == 1) ? -1 : 1;
214
+ return n*POW(Math.abs(a), 1/b);
215
  };
216
  } // End if window.NTHROOT
217
 
js/modules/05_managing_fields/admin/module_admin.js CHANGED
@@ -52,6 +52,11 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ] = {
52
  "value" : "COPYFIELDVALUE",
53
  "code" : "COPYFIELDVALUE(",
54
  "tip" : "<p>Copies the field value to the clipboard. Supports input and textarea tags. <strong>COPYFIELDVALUE( # or fieldname#, form or form selector )</strong></p><p>The first parameter is required, it would be the numeric part of the field name or the field name. The second parameter would be a form object, or a selector with the form reference. If the second parameter is not passed, the plugin will copy the value of the field in the first form of the page. For example: COPYFIELDVALUE(1); or COPYFIELDVALUE(&quot;fieldname1&quot;);</p>"
 
 
 
 
 
55
  }
56
  ]
57
  }
52
  "value" : "COPYFIELDVALUE",
53
  "code" : "COPYFIELDVALUE(",
54
  "tip" : "<p>Copies the field value to the clipboard. Supports input and textarea tags. <strong>COPYFIELDVALUE( # or fieldname#, form or form selector )</strong></p><p>The first parameter is required, it would be the numeric part of the field name or the field name. The second parameter would be a form object, or a selector with the form reference. If the second parameter is not passed, the plugin will copy the value of the field in the first form of the page. For example: COPYFIELDVALUE(1); or COPYFIELDVALUE(&quot;fieldname1&quot;);</p>"
55
+ },
56
+ {
57
+ "value" : "PRINTFORM",
58
+ "code" : "PRINTFORM(",
59
+ "tip" : "<p>Print the form only. Passing the true or 1 as the PRINTFORM parameter, it prints every page in a multipage form. Ex. PRINTFORM(); or PRINTFORM(true); for printing all pages in multipage form.</p>"
60
  }
61
  ]
62
  }
js/modules/05_managing_fields/public/05_managing_fields.js CHANGED
@@ -136,6 +136,29 @@
136
  } catch(err) { if(typeof console != 'undefined') console.log(err); }
137
  };
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  root.CF_FIELDS_MANAGEMENT = lib;
140
 
141
  })(this);
136
  } catch(err) { if(typeof console != 'undefined') console.log(err); }
137
  };
138
 
139
+ if(window.PRINTFORM == undefined)
140
+ {
141
+ lib.printform = lib.PRINTFORM = function(show_pages)
142
+ {
143
+ var o = $('#'+$.fbuilder['forms'][_getForm()].formId);
144
+ if(o.length)
145
+ {
146
+ o.addClass('cff-print');
147
+ if(!!show_pages) o.find('.pbreak').addClass('cff-print');
148
+ while(o.length)
149
+ {
150
+ o.siblings().addClass('cff-no-print');
151
+ o = o.parent();
152
+ }
153
+ }
154
+ window.print();
155
+ setTimeout(function(){
156
+ jQuery('.cff-no-print').removeClass('cff-no-print');
157
+ jQuery('.cff-print').removeClass('cff-print');
158
+ }, 5000);
159
+ };
160
+
161
+ }
162
  root.CF_FIELDS_MANAGEMENT = lib;
163
 
164
  })(this);