Calculated Fields Form - Version 1.1.124

Version Description

  • Implements the Text Operations module.
Download this release

Release Info

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

Code changes from version 1.1.123 to 1.1.124

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.1
7
- Stable tag: 1.1.123
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -965,6 +965,10 @@ A: Please, follow the steps below:
965
 
966
  == Changelog ==
967
 
 
 
 
 
968
  = 1.1.123 =
969
 
970
  * Implements two new operations CFFCOUNTIF and CFFFILTER.
@@ -1015,8 +1019,4 @@ A: Please, follow the steps below:
1015
  = 1.1.115 =
1016
 
1017
  * Modifies the number and currency controls to allow including buttons to increase and decrease their values.
1018
- * Implements the GOTOFIELD operation for scrolling to the field location, even if it is in another page of multipage form.
1019
-
1020
- = 1.1.114 =
1021
-
1022
- * Fixes a parser error when opening the public form right after importing it from the forms library.
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.1
7
+ Stable tag: 1.1.124
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.124 =
969
+
970
+ * Implements the Text Operations module.
971
+
972
  = 1.1.123 =
973
 
974
  * Implements two new operations CFFCOUNTIF and CFFFILTER.
1019
  = 1.1.115 =
1020
 
1021
  * Modifies the number and currency controls to allow including buttons to increase and decrease their values.
1022
+ * Implements the GOTOFIELD operation for scrolling to the field location, even if it is in another page of multipage form.
 
 
 
 
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 1.1.123 =
4
 
5
  * Implements two new operations CFFCOUNTIF and CFFFILTER.
1
  == Changelog ==
2
 
3
+ = 1.1.124 =
4
+
5
+ * Implements the Text Operations module.
6
+
7
  = 1.1.123 =
8
 
9
  * Implements two new operations CFFCOUNTIF and CFFFILTER.
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.123
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
@@ -15,7 +15,7 @@ if ( ! defined( 'WP_DEBUG' ) || true != WP_DEBUG ) {
15
  }
16
 
17
  // Defining main constants
18
- define( 'CP_CALCULATEDFIELDSF_VERSION', '1.1.123' );
19
  define( 'CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
20
  define( 'CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
21
  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.124
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
15
  }
16
 
17
  // Defining main constants
18
+ define( 'CP_CALCULATEDFIELDSF_VERSION', '1.1.124' );
19
  define( 'CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
20
  define( 'CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
21
  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.123';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
1
+ $.fbuilder['version'] = '1.1.124';
2
  $.fbuilder['controls'] = $.fbuilder['controls'] || {};
3
  $.fbuilder['forms'] = $.fbuilder['forms'] || {};
4
 
js/modules/10_text/admin/module_admin.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
2
+ fbuilderjQuery[ 'fbuilder' ] = fbuilderjQuery[ 'fbuilder' ] || {};
3
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modules' ] || {};
4
+
5
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'text' ] = {
6
+ 'tutorial' : 'https://cff.dwbooster.com/documentation#text-module',
7
+ 'toolbars' : {
8
+ 'text' : {
9
+ 'label' : 'Text Operations',
10
+ 'buttons' : [
11
+ {
12
+ "value" : "WORDSCOUNTER",
13
+ "code" : "WORDSCOUNTER(",
14
+ "tip" : "<p><strong>WORDSCOUNTER(text)</strong></p><p>Returns the number of words in text.<br><br> Ex. <strong>WORDSCOUNTER(fieldname123|r);</strong></p>"
15
+ },
16
+ {
17
+ "value" : "CHARSCOUNTER",
18
+ "code" : "CHARSCOUNTER(",
19
+ "tip" : "<p><strong>CHARSCOUNTER(text, ignore blank characters)</strong></p><p>Returns the number of characters in text. The second parameter allows ignoring blank characters in the text.<br><br> Ex. <strong>CHARSCOUNTER(fieldname123|r);</strong> or <strong>CHARSCOUNTER(fieldname123|r, true);</strong>.</p>"
20
+ },
21
+ {
22
+ "value" : "INTEXT",
23
+ "code" : "INTEXT(",
24
+ "tip" : "<p><strong>INTEXT(to search, text, case insensitive)</strong></p><p>Returns the number of times the word, character, phrase, or regular expression appears in the text. The search can be case-sensitive or case-insensitive (optional parameter, case-sensitive by default).<br><br> Ex. <strong>INTEXT(fieldname12|r, fieldname34|r);</strong> or <strong>INTEXT(fieldname12|r, fieldname34|r, true);</strong>.</p>"
25
+ },
26
+
27
+ ]
28
+ }
29
+ }
30
+ };
js/modules/10_text/public/10_text.js ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * text.js v0.1
3
+ * By: CALCULATED FIELD PROGRAMMERS
4
+ * Includes operations to interact with Texts
5
+ * Copyright 2022 CODEPEOPLE
6
+ */
7
+
8
+ ;(function(root){
9
+ var lib = {};
10
+
11
+ /*** PUBLIC FUNCTIONS ***/
12
+
13
+ if(window.WORDSCOUNTER == undefined) {
14
+ lib.WORDSCOUNTER = lib.wordscounter = function(text){
15
+ try {
16
+ return text.replace(/(?!\w|\s)./g, '')
17
+ .replace(/\s+/g, ' ')
18
+ .replace(/^(\s*)([\W\w]*)(\b\s*$)/g, '$2')
19
+ .split(' ').length;
20
+ } catch (err) {
21
+ return 0;
22
+ }
23
+ }
24
+ }
25
+
26
+ if(window.CHARSCOUNTER == undefined) {
27
+ lib.CHARSCOUNTER = lib.charscounter = function(text, ignore_blank){
28
+ try {
29
+ var ignore_blank = ignore_blank || 0;
30
+ text += '';
31
+ if ( ignore_blank ) text = text.replace( /[\s\r\n\t]/g, '');
32
+ return text.length;
33
+ } catch (err) {
34
+ return 0;
35
+ }
36
+ }
37
+ }
38
+
39
+ if(window.INTEXT == undefined) {
40
+ lib.INTEXT = lib.intext = function(term, text, case_insensitive){
41
+ try {
42
+ var case_insensitive = case_insensitive || 0;
43
+ if( ! term instanceof RegExp ) term += '';
44
+ text += '';
45
+ if ( case_insensitive ) {
46
+ if( term instanceof RegExp ) term = new RegExp( term.source, 'i' );
47
+ else term = term.toLowerCase();
48
+ text = text.toLowerCase();
49
+ }
50
+ return Math.max(text.split(term).length - 1, 0);
51
+ } catch (err) {
52
+ return 0;
53
+ }
54
+ }
55
+ }
56
+
57
+ root.CF_TEXT = lib;
58
+
59
+ })(this);
js/modules/10_text/public/module_public.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ fbuilderjQuery = ( typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
2
+ fbuilderjQuery[ 'fbuilder' ] = fbuilderjQuery[ 'fbuilder' ] || {};
3
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modules' ] || {};
4
+
5
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'text' ] = {
6
+ 'prefix' : '',
7
+ 'callback' : function()
8
+ {
9
+ fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ](fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'text' ][ 'prefix' ], CF_TEXT);
10
+ }
11
+ };