Calculated Fields Form - Version 1.1.85

Version Description

  • Modifies the val method in all components.
  • Fixes a style conflict between the forms builder and some themes.
  • Includes the thank_you_page tag to include the link to the thank you page in the notification emails and thank you pages (Professional, Developer, and Platinum versions).
  • Modifies the PDF Generator add-on to allow generating the PDF files after payment or generate the files even if they are not attached to any email (Platinum version)
Download this release

Release Info

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

Code changes from version 1.1.84 to 1.1.85

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: 6.0
7
- Stable tag: 1.1.84
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -965,6 +965,13 @@ A: Please, follow the steps below:
965
 
966
  == Changelog ==
967
 
 
 
 
 
 
 
 
968
  = 1.1.84 =
969
 
970
  * Modifies the Phone fields to include the country code component.
@@ -1026,8 +1033,4 @@ A: Please, follow the steps below:
1026
  * Includes new attributes in the date/time field to allow disabling the keyboard on mobiles and configure Monday as the first weekday.
1027
  * Modifies the styles on datepickers.
1028
  * Implements additional validations in the Captcha generator.
1029
- * Includes new filters to modify the headers row and body rows in the Export CSV module (Professional, Developer, and Platinum versions).
1030
-
1031
- = 1.1.75 =
1032
-
1033
- * Modifies functions deprecated by the latest Elementor update.
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: 6.0
7
+ Stable tag: 1.1.85
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.85 =
969
+
970
+ * Modifies the val method in all components.
971
+ * Fixes a style conflict between the forms builder and some themes.
972
+ * Includes the thank_you_page tag to include the link to the thank you page in the notification emails and thank you pages (Professional, Developer, and Platinum versions).
973
+ * Modifies the PDF Generator add-on to allow generating the PDF files after payment or generate the files even if they are not attached to any email (Platinum version)
974
+
975
  = 1.1.84 =
976
 
977
  * Modifies the Phone fields to include the country code component.
1033
  * Includes new attributes in the date/time field to allow disabling the keyboard on mobiles and configure Monday as the first weekday.
1034
  * Modifies the styles on datepickers.
1035
  * Implements additional validations in the Captcha generator.
1036
+ * Includes new filters to modify the headers row and body rows in the Export CSV module (Professional, Developer, and Platinum versions).
 
 
 
 
changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
3
  = 1.1.84 =
4
 
5
  * Modifies the Phone fields to include the country code component.
@@ -466,15 +472,4 @@
466
 
467
  * Modifies the processing and loading animation.
468
  * Fixes some warnings.
469
- * Resets the manual entry flag in the calculated fields in the form reset action.
470
-
471
- = 1.0.469 =
472
-
473
- * Modifies the summary, field, button, number, and calculated controls.
474
- * Implements the FORMAT operation to allow formatting the values as part of the equations.
475
-
476
- = 1.0.468 =
477
-
478
- * Fixes a conflict with some themes.
479
- * Fixes compatibility issues with PHP 8.
480
- * Improves the signature and PDF Generator add-ons (Platinum version of the plugin).
1
  == Changelog ==
2
 
3
+ = 1.1.85 =
4
+
5
+ * Modifies the val method in all components.
6
+ * Fixes a style conflict between the forms builder and some themes.
7
+ * Modifies the PDF Generator add-on to allow generating the PDF files after payment or generate the files even if they are not attached to any email (Platinum version)
8
+
9
  = 1.1.84 =
10
 
11
  * Modifies the Phone fields to include the country code component.
472
 
473
  * Modifies the processing and loading animation.
474
  * Fixes some warnings.
475
+ * Resets the manual entry flag in the calculated fields in the form reset action.
 
 
 
 
 
 
 
 
 
 
 
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.84
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.84' );
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.85
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.85' );
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/style.css CHANGED
@@ -194,7 +194,7 @@ textarea {resize: none}
194
  #fbuilder .section_break{border-top:1px dotted #555;clear:both}
195
 
196
  /* TABS */
197
- .form-builder #tabs{height:650px;width:100%;overflow:hidden;}
198
  .form-builder #tabs-1,
199
  .form-builder #tabs-2,
200
  .form-builder #tabs-3{top:35px;bottom:0;left:0;right:0;position:absolute;overflow-y:auto;}
@@ -203,7 +203,7 @@ textarea {resize: none}
203
  .form-builder #tabs .ui-tabs-nav,
204
  .form-builder #tabs .ui-tabs-nav .ui-tabs-tab{border-radius:0;}
205
  .form-builder #tabs .ui-tabs-nav{border-top:0;border-left:0;border-right:0;background:transparent !important;border-color:#ddd}
206
- .form-builder .ctrlsColumn .ui-tabs .ui-tabs-nav .ui-tabs-tab{background:#DAEDFA;width:30%;box-sizing:border-box;}
207
  .form-builder .ctrlsColumn .ui-tabs .ui-tabs-nav .ui-tabs-tab.ui-tabs-active{background:#62BBE9}
208
  .form-builder .ctrlsColumn .ui-tabs .ui-tabs-nav .ui-tabs-tab a{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width:100%;box-sizing:border-box;text-align:center;}
209
 
194
  #fbuilder .section_break{border-top:1px dotted #555;clear:both}
195
 
196
  /* TABS */
197
+ .form-builder #tabs{height:650px;width:100%;overflow:hidden;position:relative;}
198
  .form-builder #tabs-1,
199
  .form-builder #tabs-2,
200
  .form-builder #tabs-3{top:35px;bottom:0;left:0;right:0;position:absolute;overflow-y:auto;}
203
  .form-builder #tabs .ui-tabs-nav,
204
  .form-builder #tabs .ui-tabs-nav .ui-tabs-tab{border-radius:0;}
205
  .form-builder #tabs .ui-tabs-nav{border-top:0;border-left:0;border-right:0;background:transparent !important;border-color:#ddd}
206
+ .form-builder .ctrlsColumn .ui-tabs .ui-tabs-nav .ui-tabs-tab{background:#DAEDFA;width:30%;box-sizing:border-box;float:left;}
207
  .form-builder .ctrlsColumn .ui-tabs .ui-tabs-nav .ui-tabs-tab.ui-tabs-active{background:#62BBE9}
208
  .form-builder .ctrlsColumn .ui-tabs .ui-tabs-nav .ui-tabs-tab a{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width:100%;box-sizing:border-box;text-align:center;}
209
 
js/fbuilder-pro-admin.jquery.js CHANGED
@@ -510,7 +510,7 @@
510
  else
511
  {
512
  // Request cost fields
513
- if(!/(femail)|(fdate)|(ffile)|(fpassword)|(fphone)|(fsectionbreak)|(fpagebreak)|(fsummary)|(fcontainer)|(ffieldset)|(fdiv)|(fmedia)|(fbutton)|(fhtml)/i.test(item.ftype))
514
  {
515
  cost_str += '<option value="'+item.name+'" '+( ( item.name == request_cost ) ? "selected" : "" )+'>'+item.name+'('+$.fbuilder.sanitize(item.title)+')</option>'
516
  }
510
  else
511
  {
512
  // Request cost fields
513
+ if(!/(femail)|(fdate)|(ffile)|(fpassword)|(fphone)|(fsectionbreak)|(fpagebreak)|(fsummary)|(fcontainer)|(ffieldset)|(fdiv)|(fmedia)|(fbutton)|(fhtml)|(frecordsetds)|(fcommentarea)/i.test(item.ftype))
514
  {
515
  cost_str += '<option value="'+item.name+'" '+( ( item.name == request_cost ) ? "selected" : "" )+'>'+item.name+'('+$.fbuilder.sanitize(item.title)+')</option>'
516
  }
js/fbuilder-pro-public.jquery.js CHANGED
@@ -1,4 +1,4 @@
1
- $.fbuilder['version'] = '1.1.84';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
@@ -28,21 +28,22 @@
28
  return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
29
  };
30
 
31
- $.fbuilder[ 'parseValStr' ] = function( value, raw )
32
  {
33
  raw = raw || false;
 
34
  value = $.trim(value || '');
35
  value = value.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/"/g, '\\"');
36
- return ($.isNumeric(value)) ? ((raw) ? value : value*1) : '"' + value + '"';
37
  };
38
 
39
- $.fbuilder[ 'parseVal' ] = function( value, thousand, decimal )
40
  {
41
  if(!!value == false) return 0;
42
-
43
  /* date */
44
  if(/(\d{1,2}[\/\.\-]\d{1,2}[\/\.\-]\d{4})|(\d{4}[\/\.\-]\d{1,2}[\/\.\-]\d{1,2})/.test(value))
45
- return $.fbuilder[ 'parseValStr' ]( value );
46
 
47
  /* number */
48
  thousand = $.fbuilder.escapeSymbol($.trim((typeof thousand != 'undefined') ? thousand : ','));
@@ -53,7 +54,7 @@
53
  .replace( new RegExp($.fbuilder.escapeSymbol(decimal), 'g' ), '.' )
54
  .replace( /\s/g, '' ),
55
  p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
56
- return (p) ? ((/^0\d/.test(p[0])) ? p[0].substr(1) : p[0])*1 : $.fbuilder['parseValStr'](value);
57
  };
58
 
59
  $.fbuilder[ 'isMobile' ] = function() {
@@ -744,16 +745,17 @@
744
  return 'Not available yet';
745
  },
746
  after_show:function(){},
747
- val:function(raw){
748
  raw = raw || false;
 
749
  var e = $( "[id='" + this.name + "']:not(.ignore)" );
750
  if( e.length )
751
  {
752
  var v = e.val();
753
- if(raw) return $.fbuilder.parseValStr(v, raw);
754
 
755
  v = $.trim(v);
756
- return ($.isNumeric(v)) ? $.fbuilder.parseVal(v) : $.fbuilder.parseValStr(v);
757
  }
758
  return 0;
759
  },
1
+ $.fbuilder['version'] = '1.1.85';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
28
  return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
29
  };
30
 
31
+ $.fbuilder[ 'parseValStr' ] = function( value, raw, no_quotes )
32
  {
33
  raw = raw || false;
34
+ no_quotes = no_quotes || false;
35
  value = $.trim(value || '');
36
  value = value.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/"/g, '\\"');
37
+ return ($.isNumeric(value)) ? ((raw) ? value : value*1) : ((no_quotes) ? value : '"' + value + '"');
38
  };
39
 
40
+ $.fbuilder[ 'parseVal' ] = function( value, thousand, decimal, no_quotes )
41
  {
42
  if(!!value == false) return 0;
43
+ no_quotes = no_quotes || false;
44
  /* date */
45
  if(/(\d{1,2}[\/\.\-]\d{1,2}[\/\.\-]\d{4})|(\d{4}[\/\.\-]\d{1,2}[\/\.\-]\d{1,2})/.test(value))
46
+ return $.fbuilder[ 'parseValStr' ]( value, false, no_quotes );
47
 
48
  /* number */
49
  thousand = $.fbuilder.escapeSymbol($.trim((typeof thousand != 'undefined') ? thousand : ','));
54
  .replace( new RegExp($.fbuilder.escapeSymbol(decimal), 'g' ), '.' )
55
  .replace( /\s/g, '' ),
56
  p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
57
+ return (p) ? ((/^0\d/.test(p[0])) ? p[0].substr(1) : p[0])*1 : $.fbuilder['parseValStr'](value, false, no_quotes);
58
  };
59
 
60
  $.fbuilder[ 'isMobile' ] = function() {
745
  return 'Not available yet';
746
  },
747
  after_show:function(){},
748
+ val:function(raw, no_quotes){
749
  raw = raw || false;
750
+ no_quotes = no_quotes || false;
751
  var e = $( "[id='" + this.name + "']:not(.ignore)" );
752
  if( e.length )
753
  {
754
  var v = e.val();
755
+ if(raw) return $.fbuilder.parseValStr(v, raw, no_quotes);
756
 
757
  v = $.trim(v);
758
+ return ($.isNumeric(v)) ? $.fbuilder.parseVal(v) : $.fbuilder.parseValStr(v, raw, no_quotes);
759
  }
760
  return 0;
761
  },
js/fields-public/01_fbuilder.ftext.js CHANGED
@@ -43,11 +43,12 @@
43
  $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
44
  }
45
  },
46
- val:function(raw)
47
  {
48
  raw = raw || false;
 
49
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
50
- if( e.length ) return $.fbuilder.parseValStr( e.val(), raw );
51
  return 0;
52
  }
53
  }
43
  $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
44
  }
45
  },
46
+ val:function(raw, no_quotes)
47
  {
48
  raw = raw || false;
49
+ no_quotes = no_quotes || false;
50
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
51
+ if( e.length ) return $.fbuilder.parseValStr( e.val(), raw, no_quotes );
52
  return 0;
53
  }
54
  }
js/fields-public/02_fbuilder.fcurrency.js CHANGED
@@ -99,20 +99,21 @@
99
  } );
100
  }
101
  },
102
- val:function(raw)
103
  {
104
  raw = raw || false;
 
105
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
106
  if( e.length )
107
  {
108
  var v = e.val();
109
- if(raw) return ($.isNumeric(v)) ? v : $.fbuilder.parseValStr(v, raw);
110
  v = $.trim(v);
111
 
112
  v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.currencySymbol), 'g' ), '' )
113
  .replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.currencyText), 'g' ), '' );
114
 
115
- return $.fbuilder.parseVal( v, this.thousandSeparator, this.centSeparator );
116
  }
117
  return 0;
118
  }
99
  } );
100
  }
101
  },
102
+ val:function(raw, no_quotes)
103
  {
104
  raw = raw || false;
105
+ no_quotes = no_quotes || false;
106
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
107
  if( e.length )
108
  {
109
  var v = e.val();
110
+ if(raw) return ($.isNumeric(v)) ? v : $.fbuilder.parseValStr(v, raw, no_quotes);
111
  v = $.trim(v);
112
 
113
  v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.currencySymbol), 'g' ), '' )
114
  .replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.currencyText), 'g' ), '' );
115
 
116
+ return $.fbuilder.parseVal( v, this.thousandSeparator, this.centSeparator, no_quotes );
117
  }
118
  return 0;
119
  }
js/fields-public/02_fbuilder.fnumber.js CHANGED
@@ -102,15 +102,16 @@
102
  } );
103
  }
104
  },
105
- val:function(raw)
106
  {
107
  raw = raw || false;
 
108
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
109
  if( e.length )
110
  {
111
  var v = $.trim( e.val() );
112
- if(raw) return ($.isNumeric(v) && this.thousandSeparator != '.') ? v : $.fbuilder.parseValStr(v, raw);
113
- v = $.fbuilder.parseVal(v, this.thousandSeparator, this.decimalSymbol);
114
  return (this.dformat == 'percent') ? v/100 : v;
115
  }
116
  return 0;
102
  } );
103
  }
104
  },
105
+ val:function(raw,no_quotes)
106
  {
107
  raw = raw || false;
108
+ no_quotes = no_quotes || false;
109
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
110
  if( e.length )
111
  {
112
  var v = $.trim( e.val() );
113
+ if(raw) return ($.isNumeric(v) && this.thousandSeparator != '.') ? v : $.fbuilder.parseValStr(v, raw, no_quotes);
114
+ v = $.fbuilder.parseVal(v, this.thousandSeparator, this.decimalSymbol, no_quotes);
115
  return (this.dformat == 'percent') ? v/100 : v;
116
  }
117
  return 0;
js/fields-public/03_fbuilder.fcolor.js CHANGED
@@ -18,11 +18,12 @@
18
  after_show:function()
19
  {
20
  },
21
- val:function(raw)
22
  {
23
  raw = raw || false;
 
24
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
25
- if( e.length ) return $.fbuilder.parseValStr( e.val(), raw );
26
  return 0;
27
  }
28
  }
18
  after_show:function()
19
  {
20
  },
21
+ val:function(raw, no_quotes)
22
  {
23
  raw = raw || false;
24
+ no_quotes = no_quotes || false;
25
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
26
+ if( e.length ) return $.fbuilder.parseValStr( e.val(), raw, no_quotes );
27
  return 0;
28
  }
29
  }
js/fields-public/03_fbuilder.femail.js CHANGED
@@ -38,11 +38,12 @@
38
  $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
39
  }
40
  },
41
- val:function(raw)
42
  {
43
  raw = raw || false;
 
44
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
45
- if( e.length ) return $.fbuilder.parseValStr( e.val() , raw);
46
  return 0;
47
  }
48
  }
38
  $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
39
  }
40
  },
41
+ val:function(raw, no_quotes)
42
  {
43
  raw = raw || false;
44
+ no_quotes = no_quotes || false;
45
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
46
+ if( e.length ) return $.fbuilder.parseValStr( e.val(), raw, no_quotes);
47
  return 0;
48
  }
49
  }
js/fields-public/04_fbuilder.fdate.js CHANGED
@@ -365,9 +365,10 @@
365
  me._set_Events();
366
  me.set_dateTime();
367
  },
368
- val:function(raw)
369
  {
370
  raw = raw || false;
 
371
  var me = this,
372
  e = $( '[id="' + me.name + '"]:not(.ignore)' ),
373
  o = me._get_regexp();
@@ -375,7 +376,7 @@
375
  if( e.length )
376
  {
377
  var v = e.val();
378
- if(raw) return $.fbuilder.parseValStr(v, raw);
379
 
380
  v = $.trim(e.val());
381
  var re = new RegExp( '('+o.r+')?(\\s*(\\d{1,2})[:\\.](\\d{1,2})\\s*([amp]{2})?)?' ),
365
  me._set_Events();
366
  me.set_dateTime();
367
  },
368
+ val:function(raw, no_quotes)
369
  {
370
  raw = raw || false;
371
+ no_quotes = no_quotes || false;
372
  var me = this,
373
  e = $( '[id="' + me.name + '"]:not(.ignore)' ),
374
  o = me._get_regexp();
376
  if( e.length )
377
  {
378
  var v = e.val();
379
+ if(raw) return $.fbuilder.parseValStr(v, raw, no_quotes);
380
 
381
  v = $.trim(e.val());
382
  var re = new RegExp( '('+o.r+')?(\\s*(\\d{1,2})[:\\.](\\d{1,2})\\s*([amp]{2})?)?' ),
js/fields-public/05_fbuilder.ftextarea.js CHANGED
@@ -21,11 +21,12 @@
21
  this.predefined = this._getAttr('predefined');
22
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-textarea-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><textarea aria-label="'+$.fbuilder.htmlEncode(this.title)+'" '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+' autocomplete="'+this.autocomplete+'">'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
23
  },
24
- val:function(raw)
25
  {
26
  raw = raw || false;
 
27
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
28
- if( e.length ) return $.fbuilder.parseValStr(e.val().replace(/[\n\r]+/g, ' '), raw);
29
  return 0;
30
  }
31
  }
21
  this.predefined = this._getAttr('predefined');
22
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-textarea-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><textarea aria-label="'+$.fbuilder.htmlEncode(this.title)+'" '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+' autocomplete="'+this.autocomplete+'">'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
23
  },
24
+ val:function(raw, no_quotes)
25
  {
26
  raw = raw || false;
27
+ no_quotes = no_quotes || false;
28
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
29
+ if( e.length ) return $.fbuilder.parseValStr(e.val().replace(/[\n\r]+/g, ' '), raw, no_quotes);
30
  return 0;
31
  }
32
  }
js/fields-public/06_fbuilder.fcheck.js CHANGED
@@ -112,9 +112,10 @@
112
  catch( e ){ }
113
  return result;
114
  },
115
- val:function(raw)
116
  {
117
  raw = raw || false;
 
118
  var v, me = this, m = me.merge && !raw,
119
  e = $('[id*="' + me.name + '"]:checked:not(.ignore)');
120
 
@@ -122,7 +123,7 @@
122
  if( e.length )
123
  {
124
  e.each( function(){
125
- var t = (m) ? $.fbuilder.parseVal(this.value) : $.fbuilder.parseValStr((raw == 'vt') ? this.getAttribute('vt') : this.value, raw);
126
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
127
  if(m) v = (v)?v+t:t;
128
  else v.push(t);
@@ -135,14 +136,16 @@
135
  _default = _default || false;
136
  nochange = nochange || false;
137
 
138
- var t, n = this.name, c = 0;
139
  if( !$.isArray( v ) ) v = [v];
140
  $( '[id*="'+n+'"]' ).prop( 'checked', false );
141
  for( var i in v )
142
  {
143
  t = (new String(v[i])).replace(/(['"])/g, "\\$1");
144
  if(0 < this.max && c+1 == this.max) break;
145
- $( _default ? '[id*="'+n+'"][vt="'+t+'"]' : '[id*="'+n+'"][value="'+t+'"]' ).prop( 'checked', true );
 
 
146
  }
147
  this.enable_disable();
148
  if(!nochange) $( '[id*="'+n+'"]' ).change();
112
  catch( e ){ }
113
  return result;
114
  },
115
+ val:function(raw, no_quotes)
116
  {
117
  raw = raw || false;
118
+ no_quotes = no_quotes || false;
119
  var v, me = this, m = me.merge && !raw,
120
  e = $('[id*="' + me.name + '"]:checked:not(.ignore)');
121
 
123
  if( e.length )
124
  {
125
  e.each( function(){
126
+ var t = (m) ? $.fbuilder.parseVal(this.value) : $.fbuilder.parseValStr((raw == 'vt') ? this.getAttribute('vt') : this.value, raw, no_quotes);
127
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
128
  if(m) v = (v)?v+t:t;
129
  else v.push(t);
136
  _default = _default || false;
137
  nochange = nochange || false;
138
 
139
+ var t, n = this.name, c = 0, e;
140
  if( !$.isArray( v ) ) v = [v];
141
  $( '[id*="'+n+'"]' ).prop( 'checked', false );
142
  for( var i in v )
143
  {
144
  t = (new String(v[i])).replace(/(['"])/g, "\\$1");
145
  if(0 < this.max && c+1 == this.max) break;
146
+ if(_default) e = $('[id*="'+n+'"][vt="'+t+'"]');
147
+ if(!_default || !e.length) e = $('[id*="'+n+'"][value="'+t+'"]');
148
+ if(e.length) e.prop( 'checked', true );
149
  }
150
  this.enable_disable();
151
  if(!nochange) $( '[id*="'+n+'"]' ).change();
js/fields-public/07_fbuilder.fradio.js CHANGED
@@ -115,11 +115,12 @@
115
  catch( e ){ }
116
  return result;
117
  },
118
- val:function(raw)
119
  {
120
  raw = raw || false;
 
121
  var e = $( '[id*="' + this.name + '"]:not(.ignore):checked' );
122
- if( e.length ) return $.fbuilder.parseValStr( (raw == 'vt') ? e.attr('vt') : e.val(), raw );
123
  return 0;
124
  },
125
  setVal:function( v, nochange, _default )
@@ -127,9 +128,11 @@
127
  _default = _default || false;
128
  nochange = nochange || false;
129
 
130
- var t = (new String(v)).replace(/(['"])/g, "\\$1"), n = this.name;
131
  $( '[id*="'+n+'"]' ).prop( 'checked', false );
132
- $( _default ? '[id*="'+n+'"][vt="'+t+'"]' : '[id*="'+n+'"][value="'+t+'"]' ).prop( 'checked', true );
 
 
133
  if(!nochange) $( '[id*="'+n+'"]' ).change();
134
  },
135
  setChoices:function(choices)
115
  catch( e ){ }
116
  return result;
117
  },
118
+ val:function(raw, no_quotes)
119
  {
120
  raw = raw || false;
121
+ no_quotes = no_quotes || false;
122
  var e = $( '[id*="' + this.name + '"]:not(.ignore):checked' );
123
+ if( e.length ) return $.fbuilder.parseValStr( (raw == 'vt') ? e.attr('vt') : e.val(), raw, no_quotes );
124
  return 0;
125
  },
126
  setVal:function( v, nochange, _default )
128
  _default = _default || false;
129
  nochange = nochange || false;
130
 
131
+ var t = (new String(v)).replace(/(['"])/g, "\\$1"), n = this.name, e;
132
  $( '[id*="'+n+'"]' ).prop( 'checked', false );
133
+ if(_default) e = $('[id*="'+n+'"][vt="'+t+'"]');
134
+ if(!_default || !e.length) e = $('[id*="'+n+'"][value="'+t+'"]');
135
+ if(e.length) e.prop( 'checked', true );
136
  if(!nochange) $( '[id*="'+n+'"]' ).change();
137
  },
138
  setChoices:function(choices)
js/fields-public/08_fbuilder.fdropdown.js CHANGED
@@ -140,9 +140,10 @@
140
  catch( e ){}
141
  return result;
142
  },
143
- val:function(raw)
144
  {
145
  raw = raw || false;
 
146
  var e = $( '[id="' + this.name + '"]:not(.ignore) option:selected' ),
147
  v,
148
  m = this.multiple,
@@ -152,7 +153,7 @@
152
  if(e.length)
153
  {
154
  e.each(function(){
155
- var t = $.fbuilder.parseValStr((raw == 'vt') ? this.getAttribute('vt') : this.value, raw);
156
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
157
  if(!m || g) v = (v)?v+t:t;
158
  else v.push(t);
@@ -164,13 +165,14 @@
164
  {
165
  _default = _default || false;
166
  nochange = nochange || false;
167
-
168
  if( !$.isArray( v ) ) v = [v];
169
- var t, n = this.name, selector;
170
  for(var i in v)
171
  {
172
  t = (new String(v[i])).replace(/(['"])/g, "\\$1");
173
- $( _default ? '[id="'+n+'"] OPTION[vt="'+t+'"]' : '[id="'+n+'"] OPTION[value="'+t+'"]' ).prop( 'selected', true );
 
 
174
  }
175
  if(!nochange) $( '[id="'+n+'"]' ).change();
176
  },
140
  catch( e ){}
141
  return result;
142
  },
143
+ val:function(raw, no_quotes)
144
  {
145
  raw = raw || false;
146
+ no_quotes = no_quotes || false;
147
  var e = $( '[id="' + this.name + '"]:not(.ignore) option:selected' ),
148
  v,
149
  m = this.multiple,
153
  if(e.length)
154
  {
155
  e.each(function(){
156
+ var t = $.fbuilder.parseValStr((raw == 'vt') ? this.getAttribute('vt') : this.value, raw, no_quotes);
157
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
158
  if(!m || g) v = (v)?v+t:t;
159
  else v.push(t);
165
  {
166
  _default = _default || false;
167
  nochange = nochange || false;
 
168
  if( !$.isArray( v ) ) v = [v];
169
+ var t, e, n = this.name, selector;
170
  for(var i in v)
171
  {
172
  t = (new String(v[i])).replace(/(['"])/g, "\\$1");
173
+ if(_default) e = $('[id="'+n+'"] OPTION[vt="'+t+'"]');
174
+ if(!_default || !e.length) e = $('[id="'+n+'"] OPTION[value="'+t+'"]');
175
+ if(e.length) e.prop( 'selected', true );
176
  }
177
  if(!nochange) $( '[id="'+n+'"]' ).change();
178
  },
js/fields-public/09_fbuilder.ffile.js CHANGED
@@ -88,9 +88,10 @@
88
 
89
  $('#'+me.name+'_clearer').click(function(){$('#'+me.name).val('').change().valid();});
90
  },
91
- val : function(raw)
92
  {
93
  raw = raw || false;
 
94
  var e = $( "[id='" + this.name + "']:not(.ignore)" ), result = '', separator = '';
95
  if( e.length )
96
  {
@@ -102,7 +103,7 @@
102
  result += separator+e[0].files[i].name;
103
  separator = ', ';
104
  }
105
- result = $.fbuilder.parseValStr(result, raw);
106
  }
107
  }
108
  return result;
88
 
89
  $('#'+me.name+'_clearer').click(function(){$('#'+me.name).val('').change().valid();});
90
  },
91
+ val : function(raw, no_quotes)
92
  {
93
  raw = raw || false;
94
+ no_quotes = no_quotes || false;
95
  var e = $( "[id='" + this.name + "']:not(.ignore)" ), result = '', separator = '';
96
  if( e.length )
97
  {
103
  result += separator+e[0].files[i].name;
104
  separator = ', ';
105
  }
106
+ result = $.fbuilder.parseValStr(result, raw, no_quotes);
107
  }
108
  }
109
  return result;
js/fields-public/10_fbuilder.fpassword.js CHANGED
@@ -41,11 +41,12 @@
41
  $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
42
  }
43
  },
44
- val:function(raw)
45
  {
46
  raw = raw || false;
 
47
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
48
- if( e.length ) return $.fbuilder.parseValStr( e.val(), raw );
49
  return 0;
50
  }
51
  }
41
  $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
42
  }
43
  },
44
+ val:function(raw, no_quotes)
45
  {
46
  raw = raw || false;
47
+ no_quotes = no_quotes || false;
48
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
49
+ if( e.length ) return $.fbuilder.parseValStr( e.val(), raw, no_quotes );
50
  return 0;
51
  }
52
  }
js/fields-public/11_fbuilder.fphone.js CHANGED
@@ -92,12 +92,14 @@
92
  }
93
  $( '#'+me.name+'_0').change();
94
  },
95
- val:function()
96
  {
 
 
97
  var e = $( '[id="' + this.name + '"]:not(.ignore)' ),
98
- p = $.fbuilder.parseValStr(e.val(), true);
99
 
100
- if( e.length ) return ($.isNumeric(p)) ? '"'+p+'"' : p;
101
  return 0;
102
  },
103
  setVal:function( v )
92
  }
93
  $( '#'+me.name+'_0').change();
94
  },
95
+ val:function(raw, no_quotes)
96
  {
97
+ raw = raw || true;
98
+ no_quotes = no_quotes || false;
99
  var e = $( '[id="' + this.name + '"]:not(.ignore)' ),
100
+ p = $.fbuilder.parseValStr(e.val(), raw, no_quotes);
101
 
102
+ if( e.length ) return ($.isNumeric(p) && !no_quotes) ? '"'+p+'"' : p;
103
  return 0;
104
  },
105
  setVal:function( v )
js/fields-public/36_fbuilder.acceptance.js CHANGED
@@ -48,16 +48,17 @@
48
  });
49
  $(document).on('click','.cff-close-dlg', function(){$(this).closest('.cff-dialog').addClass('hide');});
50
  },
51
- val:function(raw)
52
  {
53
  raw = raw || false;
 
54
  var e = $('[id="'+this.name+'"]:checked:not(.ignore)');
55
  if( e.length )
56
  {
57
- var t = $.fbuilder.parseValStr( e[0].value, raw );
58
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
59
  }
60
- return (t) ? (($.isNumeric(t)) ? t : '"'+t+'"') : 0;
61
  }
62
  }
63
  );
48
  });
49
  $(document).on('click','.cff-close-dlg', function(){$(this).closest('.cff-dialog').addClass('hide');});
50
  },
51
+ val:function(raw, no_quotes)
52
  {
53
  raw = raw || false;
54
+ no_quotes = no_quotes || false;
55
  var e = $('[id="'+this.name+'"]:checked:not(.ignore)');
56
  if( e.length )
57
  {
58
+ var t = $.fbuilder.parseValStr( e[0].value, raw, no_quotes );
59
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
60
  }
61
+ return (t) ? (($.isNumeric(t) && !no_quotes) ? t : '"'+t+'"') : 0;
62
  }
63
  }
64
  );
js/fields-public/fbuilder.fcalculated.js CHANGED
@@ -180,20 +180,21 @@
180
  }
181
  return result;
182
  },
183
- val: function(raw)
184
  {
185
  raw = raw || false;
 
186
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
187
  if( e.length )
188
  {
189
  var v = e.val();
190
- if(raw) return $.fbuilder.parseValStr(v, raw);
191
  v = $.trim( v );
192
 
193
  v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.prefix), 'g' ), '' )
194
  .replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.suffix), 'g' ), '' );
195
 
196
- return $.fbuilder.parseVal( v, this.groupingsymbol, this.decimalsymbol );
197
  }
198
  return 0;
199
  }
180
  }
181
  return result;
182
  },
183
+ val: function(raw, no_quotes)
184
  {
185
  raw = raw || false;
186
+ no_quotes = no_quotes || false;
187
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
188
  if( e.length )
189
  {
190
  var v = e.val();
191
+ if(raw) return $.fbuilder.parseValStr(v, raw, no_quotes);
192
  v = $.trim( v );
193
 
194
  v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.prefix), 'g' ), '' )
195
  .replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.suffix), 'g' ), '' );
196
 
197
+ return $.fbuilder.parseVal( v, this.groupingsymbol, this.decimalsymbol, no_quotes );
198
  }
199
  return 0;
200
  }
languages/calculated-fields-form-en_US.mo CHANGED
Binary file
languages/calculated-fields-form-en_US.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2022-05-03 01:25+0200\n"
5
- "PO-Revision-Date: 2022-05-03 01:25+0200\n"
6
  "Last-Translator: CodePeople\n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2022-05-10 12:42+0200\n"
5
+ "PO-Revision-Date: 2022-05-10 12:42+0200\n"
6
  "Last-Translator: CodePeople\n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"