Calculated Fields Form - Version 1.0.438

Version Description

  • Fixes an issue duplicating summary controls.
  • Modifies the defaultCalc operation for accepting an object.
Download this release

Release Info

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

Code changes from version 1.0.435 to 1.0.438

README.txt CHANGED
@@ -949,6 +949,23 @@ This way the special characters should show correctly.
949
 
950
  == Changelog ==
951
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952
  = 1.0.435 =
953
 
954
  * Implements the REMAINDER operation.
@@ -990,24 +1007,8 @@ This way the special characters should show correctly.
990
  * Modifies the date/time control to fix an issue with the default dates.
991
  * Prevents some conflicts caused by the cache plugins.
992
 
993
- = 1.0.428 =
994
-
995
- * Modifies the plugin styles.
996
- * Fixes some conflicts with WordPress v5.6.
997
- * Fixes a minor issue in the Users Permissions add-on (Developer and Platinum versions).
998
-
999
- = 1.0.427 =
1000
-
1001
- * Modifies the slider control.
1002
- * Modifies the styles to adapt the appearance of the form to the default theme of WordPress v5.6.
1003
- * Fixes a minor issue in the CSV Generator add-on (Platinum version).
1004
-
1005
- = 1.0.426 =
1006
-
1007
- * Assign different colors to the fields in the form builder to identify them more easily.
1008
-
1009
  == Upgrade Notice ==
1010
 
1011
- = 1.0.435 =
1012
 
1013
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://cff.dwbooster.com/contact-us
949
 
950
  == Changelog ==
951
 
952
+ = 1.0.438 =
953
+
954
+ * Fixes an issue duplicating summary controls.
955
+ * Modifies the defaultCalc operation for accepting an object.
956
+
957
+ = 1.0.437 =
958
+
959
+ * Fixes a zoom issue in iPhones.
960
+ * Includes a new feature in the Users Permissions add-on for sending a notification email to the users when admin edit their submissions (Developer and Platinum versions).
961
+
962
+ = 1.0.436 =
963
+
964
+ * Modifies the button control for accepting OnMouseDown button.
965
+ * Modifies the media control to allow the width and height attributes to affect the audio tags.
966
+ * Modifies the template 13 to allow printing the ticked radio buttons and checkbox fields.
967
+ * Fixes a minor conflict between the no-cache attribute and the thank you pages URLs with bookmarks (Professional, Developer, and Platinum versions).
968
+
969
  = 1.0.435 =
970
 
971
  * Implements the REMAINDER operation.
1007
  * Modifies the date/time control to fix an issue with the default dates.
1008
  * Prevents some conflicts caused by the cache plugins.
1009
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
  == Upgrade Notice ==
1011
 
1012
+ = 1.0.438 =
1013
 
1014
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://cff.dwbooster.com/contact-us
changelog.txt CHANGED
@@ -1,5 +1,22 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.435 =
4
 
5
  * Implements the REMAINDER operation.
1
  == Changelog ==
2
 
3
+ = 1.0.438 =
4
+
5
+ * Fixes an issue duplicating summary controls.
6
+ * Modifies the defaultCalc operation for accepting an object.
7
+
8
+ = 1.0.437 =
9
+
10
+ * Fixes a zoom issue in iPhones.
11
+ * Includes a new feature in the Users Permissions add-on for sending a notification email to the users when admin edit their submissions (Developer and Platinum versions).
12
+
13
+ = 1.0.436 =
14
+
15
+ * Modifies the button control for accepting OnMouseDown button.
16
+ * Modifies the media control to allow the width and height attributes to affect the audio tags.
17
+ * Modifies the template 13 to allow printing the ticked radio buttons and checkbox fields.
18
+ * Fixes a minor conflict between the no-cache attribute and the thank you pages URLs with bookmarks (Professional, Developer, and Platinum versions).
19
+
20
  = 1.0.435 =
21
 
22
  * Implements the REMAINDER operation.
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.0.435
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.0.435' );
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.0.438
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.0.438' );
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
@@ -452,4 +452,18 @@
452
  }
453
  #fbuilder .cff-dialog{position:fixed;z-index:999999;padding:30px;width:600px;height:300px;background:#fff;top:50%;left:50%;box-shadow:rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;}
454
  #fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;white-space:normal;}
455
- #fbuilder #loginform label{min-width:250px;display:inline-block;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  }
453
  #fbuilder .cff-dialog{position:fixed;z-index:999999;padding:30px;width:600px;height:300px;background:#fff;top:50%;left:50%;box-shadow:rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;}
454
  #fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;white-space:normal;}
455
+ #fbuilder #loginform label{min-width:250px;display:inline-block;}
456
+
457
+ /* ZOOM IPHONE */
458
+ @media screen and (device-aspect-ratio: 2/3) {
459
+ #fbuilder select,#fbuilder textarea,#fbuilder input[type="text"],#fbuilder input[type="password"],#fbuilder input[type="date"],#fbuilder input[type="number"],#fbuilder input[type="email"],#fbuilder input[type="tel"]{font-size: 16px;}
460
+ }
461
+ @media screen and (device-aspect-ratio: 40/71) {
462
+ #fbuilder select,#fbuilder textarea,#fbuilder input[type="text"],#fbuilder input[type="password"],#fbuilder input[type="date"],#fbuilder input[type="number"],#fbuilder input[type="email"],#fbuilder input[type="tel"]{font-size: 16px;}
463
+ }
464
+ @media screen and (device-aspect-ratio: 375/667) {
465
+ #fbuilder select,#fbuilder textarea,#fbuilder input[type="text"],#fbuilder input[type="password"],#fbuilder input[type="date"],#fbuilder input[type="number"],#fbuilder input[type="email"],#fbuilder input[type="tel"]{font-size: 16px;}
466
+ }
467
+ @media screen and (device-aspect-ratio: 9/16) {
468
+ #fbuilder select,#fbuilder textarea,#fbuilder input[type="text"],#fbuilder input[type="password"],#fbuilder input[type="date"],#fbuilder input[type="number"],#fbuilder input[type="email"],#fbuilder input[type="tel"]{font-size: 16px;}
469
+ }
js/fbuilder-pro-admin.jquery.js CHANGED
@@ -152,7 +152,7 @@
152
  for ( i in fieldsIndex ) if( /fieldname/.test( i ) ) n = Math.max( parseInt( i.replace( /fieldname/g,"" ) ), n );
153
 
154
  item = $.extend( true, {}, duplicate, { name:"fieldname"+(n+1) } );
155
- if( typeof item[ 'fields' ] != 'undefined' ) item[ 'fields' ] = [];
156
  if( typeof parentItem != 'undefined' ) item[ 'parent' ] = parentItem;
157
  else
158
  {
152
  for ( i in fieldsIndex ) if( /fieldname/.test( i ) ) n = Math.max( parseInt( i.replace( /fieldname/g,"" ) ), n );
153
 
154
  item = $.extend( true, {}, duplicate, { name:"fieldname"+(n+1) } );
155
+ if( typeof item[ 'fields' ] != 'undefined' && typeof item[ 'duplicateItem' ] != 'undefined') item[ 'fields' ] = [];
156
  if( typeof parentItem != 'undefined' ) item[ 'parent' ] = parentItem;
157
  else
158
  {
js/fields-admin/31_fbuilder.fmedia.js CHANGED
@@ -83,10 +83,11 @@
83
  {
84
  var esc = $.fbuilder.htmlEncode,
85
  a = [],
 
86
  t = ( isV ) ? 'video' : 'audio';
87
 
88
- if( $.trim( d.sWidth ) ) a.push( 'width="'+esc( d.sWidth )+'"' );
89
- if( isV && $.trim( d.sHeight ) ) a.push( 'height="'+esc( d.sHeight )+'"' );
90
  if( isV && $.trim( d.sPoster ) ) a.push( 'poster="'+esc( d.sPoster )+'"' );
91
  if( $.trim( d.sSrc ) ) a.push( 'src="'+esc( d.sSrc )+'"' );
92
  if( d.sAutoplay ) a.push( 'autoplay' );
@@ -96,7 +97,7 @@
96
  if( d.sHideDownload ) a.push( 'controlsList="nodownload"' );
97
  a.push( 'preload="'+esc( d.sPreload )+'"' );
98
 
99
- return '<'+t+' '+a.join( ' ' )+'>'+( ( $.trim( d.sSrcAlt ) ) ? '<source src="'+esc( d.sSrcAlt )+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
100
  },
101
  _display_audio: function()
102
  {
83
  {
84
  var esc = $.fbuilder.htmlEncode,
85
  a = [],
86
+ s = [],
87
  t = ( isV ) ? 'video' : 'audio';
88
 
89
+ if( $.trim( d.sWidth ) ) s.push( 'width:'+esc( d.sWidth )+';' );
90
+ if( isV && $.trim( d.sHeight ) ) s.push( 'height:'+esc( d.sHeight )+';' );
91
  if( isV && $.trim( d.sPoster ) ) a.push( 'poster="'+esc( d.sPoster )+'"' );
92
  if( $.trim( d.sSrc ) ) a.push( 'src="'+esc( d.sSrc )+'"' );
93
  if( d.sAutoplay ) a.push( 'autoplay' );
97
  if( d.sHideDownload ) a.push( 'controlsList="nodownload"' );
98
  a.push( 'preload="'+esc( d.sPreload )+'"' );
99
 
100
+ return '<'+t+' '+a.join(' ')+' style="'+s.join(' ')+'">'+(($.trim(d.sSrcAlt)) ? '<source src="'+esc(d.sSrcAlt)+'" />' : '')+'<p>'+d.sFallback+'</p></'+t+'>';
101
  },
102
  _display_audio: function()
103
  {
js/fields-admin/32_fbuilder.fbutton.js CHANGED
@@ -14,6 +14,7 @@
14
  sType:"button", // button, reset, calculate
15
  sValue:"button",
16
  sOnclick:"",
 
17
  sLoading: false,
18
  userhelp:"A description of the section goes here.",
19
  display:function()
@@ -26,6 +27,7 @@
26
  {s:"#sValue",e:"change keyup", l:"sValue"},
27
  {s:"#sLoading",e:"click", l:"sLoading",f:function(el){return el.is(':checked');}},
28
  {s:"#sOnclick",e:"change keyup", l:"sOnclick"},
 
29
  {
30
  s:"[name='sType']",e:"click",
31
  l:"sType",
@@ -64,7 +66,8 @@
64
  },
65
  _showOnclickSettings: function()
66
  {
67
- return '<label>OnClick event</label><textarea class="large" name="sOnclick" id="sOnclick">'+this.sOnclick+'</textarea>';
 
68
  },
69
  showTitle: function(){ return ''; },
70
  showShortLabel: function(){ return ''; }
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()
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
  {
32
  s:"[name='sType']",e:"click",
33
  l:"sType",
66
  },
67
  _showOnclickSettings: function()
68
  {
69
+ return '<label>OnClick event</label><textarea class="large" name="sOnclick" id="sOnclick">'+this.sOnclick+'</textarea>'+
70
+ '<label>OnMouseDown event</label><textarea class="large" name="sOnmousedown" id="sOnmousedown">'+this.sOnmousedown+'</textarea>';
71
  },
72
  showTitle: function(){ return ''; },
73
  showShortLabel: function(){ return ''; }
js/fields-public/31_fbuilder.fmedia.js CHANGED
@@ -73,10 +73,11 @@
73
  {
74
  var esc = $.fbuilder.htmlEncode,
75
  a = [],
 
76
  t = ( isV ) ? 'video' : 'audio' ;
77
 
78
- if( $.trim( d.sWidth ) ) a.push( 'width="'+esc( d.sWidth )+'"' );
79
- if( isV && $.trim( d.sHeight ) ) a.push( 'height="'+esc( d.sHeight )+'"' );
80
  if( isV && $.trim( d.sPoster ) ) a.push( 'poster="'+esc( d.sPoster )+'"' );
81
  if( $.trim( d.sSrc ) ) a.push( 'src="'+esc( d.sSrc )+'"' );
82
  if( d.sAutoplay ) a.push( 'autoplay' );
@@ -86,7 +87,7 @@
86
  if( d.sHideDownload ) a.push( 'controlsList="nodownload"' );
87
  a.push( 'preload="'+esc( d.sPreload )+'"' );
88
 
89
- return '<'+t+' '+a.join( ' ' )+'>'+( ( $.trim( d.sSrcAlt ) ) ? '<source src="'+esc( d.sSrcAlt )+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
90
  },
91
  _show_audio: function()
92
  {
73
  {
74
  var esc = $.fbuilder.htmlEncode,
75
  a = [],
76
+ s = [],
77
  t = ( isV ) ? 'video' : 'audio' ;
78
 
79
+ if( $.trim( d.sWidth ) ) s.push( 'width:'+esc( d.sWidth )+';' );
80
+ if( isV && $.trim( d.sHeight ) ) s.push( 'height:'+esc( d.sHeight )+';' );
81
  if( isV && $.trim( d.sPoster ) ) a.push( 'poster="'+esc( d.sPoster )+'"' );
82
  if( $.trim( d.sSrc ) ) a.push( 'src="'+esc( d.sSrc )+'"' );
83
  if( d.sAutoplay ) a.push( 'autoplay' );
87
  if( d.sHideDownload ) a.push( 'controlsList="nodownload"' );
88
  a.push( 'preload="'+esc( d.sPreload )+'"' );
89
 
90
+ return '<'+t+' '+a.join(' ')+' style="'+s.join(' ')+'">'+(($.trim(d.sSrcAlt)) ? '<source src="'+esc(d.sSrcAlt)+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
91
  },
92
  _show_audio: function()
93
  {
js/fields-public/32_fbuilder.fbutton.js CHANGED
@@ -8,6 +8,7 @@
8
  sValue:"button",
9
  sLoading:false,
10
  sOnclick:"",
 
11
  userhelp:"A description of the section goes here.",
12
  show:function()
13
  {
@@ -30,7 +31,8 @@
30
  after_show:function()
31
  {
32
  var me = this;
33
- $( '#'+this.name ).click(
 
34
  function()
35
  {
36
  var e = $( this );
8
  sValue:"button",
9
  sLoading:false,
10
  sOnclick:"",
11
+ sOnmousedown:"",
12
  userhelp:"A description of the section goes here.",
13
  show:function()
14
  {
31
  after_show:function()
32
  {
33
  var me = this;
34
+ $('#'+this.name).mousedown(function(){eval(me.sOnmousedown);});
35
+ $('#'+this.name).click(
36
  function()
37
  {
38
  var e = $( this );
js/fields-public/fbuilder.fcalculated.js CHANGED
@@ -425,15 +425,15 @@
425
  return list.length || list_h.length;
426
  },
427
 
428
- defaultCalc : function( form_identifier, enqueued ) // Evaluate all equations in form
429
  {
430
- var form = $( form_identifier ),
431
- fSec = form_identifier.match( /_\d+$/ )[0],
432
- dep = false;
433
 
434
  // The form exists and has equations
435
  if( form.length )
436
  {
 
437
  if(enqueued)
438
  {
439
  this.processQueue( fSec );
425
  return list.length || list_h.length;
426
  },
427
 
428
+ defaultCalc : function( form, enqueued ) // Evaluate all equations in form
429
  {
430
+ var dep = false;
431
+ form = $(form);
 
432
 
433
  // The form exists and has equations
434
  if( form.length )
435
  {
436
+ var fSec = form.attr('id').match( /_\d+$/ )[0];
437
  if(enqueued)
438
  {
439
  this.processQueue( fSec );
templates/13/style.css CHANGED
@@ -105,27 +105,29 @@
105
  direction: ltr;
106
  }
107
 
108
- .cp_cff_13 #fbuilder input[type="checkbox"],
109
- .cp_cff_13 #fbuilder input[type="radio"] {
110
- border: 1px solid #7e8993;
111
- border-radius: 4px;
112
- background: #fff;
113
- color: #555;
114
- clear: none;
115
- cursor: pointer;
116
- display: inline-block;
117
- line-height: 0;
118
- height: 16px;
119
- margin: -4px 4px 0 0;
120
- outline: 0;
121
- padding: 0 !important;
122
- text-align: center;
123
- vertical-align: middle;
124
- width: 16px;
125
- min-width: 16px;
126
- -webkit-appearance: none !important;
127
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
128
- transition: .05s border-color ease-in-out;
 
 
129
  }
130
 
131
  .cp_cff_13 #fbuilder input[type="reset"]:hover,
@@ -133,38 +135,40 @@
133
  color: #00a0d2;
134
  }
135
 
136
- .cp_cff_13 #fbuilder input[type="radio"] {
137
- border-radius: 50%;
138
- margin-right: 4px;
139
- line-height: 0.71428571;
140
- }
 
141
 
142
- .cp_cff_13 #fbuilder input[type="checkbox"]:checked::before,
143
- .cp_cff_13 #fbuilder input[type="radio"]:checked::before {
144
- float: left;
145
- display: inline-block;
146
- vertical-align: middle;
147
- width: 16px;
148
- speak: none;
149
- -webkit-font-smoothing: antialiased;
150
- -moz-osx-font-smoothing: grayscale;
151
- }
152
 
153
- .cp_cff_13 #fbuilder input[type="checkbox"]:checked::before {
154
- content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%231e8cbe%27%2F%3E%3C%2Fsvg%3E");
155
- margin: -3px 0 0 -4px;
156
- height: 21px;
157
- width: 21px;
158
- }
159
 
160
- .cp_cff_13 #fbuilder input[type="radio"]:checked::before {
161
- content: "";
162
- border-radius: 50%;
163
- width: 8px;
164
- height: 8px;
165
- margin: 3px;
166
- background-color: #1e8cbe;
167
- line-height: 1.14285714;
 
168
  }
169
 
170
  .cp_cff_13 #fbuilder input[readonly],
105
  direction: ltr;
106
  }
107
 
108
+ @media only screen{
109
+ .cp_cff_13 #fbuilder input[type="checkbox"],
110
+ .cp_cff_13 #fbuilder input[type="radio"] {
111
+ border: 1px solid #7e8993;
112
+ border-radius: 4px;
113
+ background: #fff;
114
+ color: #555;
115
+ clear: none;
116
+ cursor: pointer;
117
+ display: inline-block;
118
+ line-height: 0;
119
+ height: 16px;
120
+ margin: -4px 4px 0 0;
121
+ outline: 0;
122
+ padding: 0 !important;
123
+ text-align: center;
124
+ vertical-align: middle;
125
+ width: 16px;
126
+ min-width: 16px;
127
+ -webkit-appearance: none !important;
128
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
129
+ transition: .05s border-color ease-in-out;
130
+ }
131
  }
132
 
133
  .cp_cff_13 #fbuilder input[type="reset"]:hover,
135
  color: #00a0d2;
136
  }
137
 
138
+ @media only screen{
139
+ .cp_cff_13 #fbuilder input[type="radio"] {
140
+ border-radius: 50%;
141
+ margin-right: 4px;
142
+ line-height: 0.71428571;
143
+ }
144
 
145
+ .cp_cff_13 #fbuilder input[type="checkbox"]:checked::before,
146
+ .cp_cff_13 #fbuilder input[type="radio"]:checked::before {
147
+ float: left;
148
+ display: inline-block;
149
+ vertical-align: middle;
150
+ width: 16px;
151
+ speak: none;
152
+ -webkit-font-smoothing: antialiased;
153
+ -moz-osx-font-smoothing: grayscale;
154
+ }
155
 
156
+ .cp_cff_13 #fbuilder input[type="checkbox"]:checked::before {
157
+ content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%231e8cbe%27%2F%3E%3C%2Fsvg%3E");
158
+ margin: -3px 0 0 -4px;
159
+ height: 21px;
160
+ width: 21px;
161
+ }
162
 
163
+ .cp_cff_13 #fbuilder input[type="radio"]:checked::before {
164
+ content: "";
165
+ border-radius: 50%;
166
+ width: 8px;
167
+ height: 8px;
168
+ margin: 3px;
169
+ background-color: #1e8cbe;
170
+ line-height: 1.14285714;
171
+ }
172
  }
173
 
174
  .cp_cff_13 #fbuilder input[readonly],