Version Description
- Modifies the slider controls and dependencies.
- Rounds the seconds in the DECIMALTOTIME operation.
- Implements the ISIGNORED and ISHIDDEN operations.
- Allows accessing the variations prices in WooCommerce products (CFF - WooCommerce add-on, Developer, and Platinum plugin versions).
Download this release
Release Info
Developer | codepeople |
Plugin | Calculated Fields Form |
Version | 1.1.132 |
Comparing to | |
See all releases |
Code changes from version 1.1.131 to 1.1.132
- README.txt +9 -7
- changelog.txt +7 -0
- cp_calculatedfieldsf_free.php +2 -2
- css/stylepublic.css +1 -1
- inc/cpcff_main.inc.php +14 -12
- js/fbuilder-pro-public.jquery.js +1 -1
- js/fields-admin/06_fbuilder.fcheck.js +1 -1
- js/fields-admin/07_fbuilder.fradio.js +1 -1
- js/fields-admin/08_fbuilder.fdropdown.js +1 -1
- js/fields-public/02_fbuilder.fslider.js +10 -2
- js/fields-public/06_fbuilder.fcheck.js +3 -2
- js/fields-public/07_fbuilder.fradio.js +3 -2
- js/fields-public/08_fbuilder.fdropdown.js +3 -2
- js/modules/02_datetime/public/01_datetime.js +1 -1
- js/modules/05_managing_fields/admin/module_admin.js +10 -0
- js/modules/05_managing_fields/public/05_managing_fields.js +15 -1
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.
|
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.131 =
|
969 |
|
970 |
* Modifies the slider, checkbox, radio buttons, and dropdown controls.
|
@@ -1016,9 +1023,4 @@ A: Please, follow the steps below:
|
|
1016 |
* Implements two new operations CFFCOUNTIF and CFFFILTER.
|
1017 |
* Fixes a minor issue in the advanced equations editor.
|
1018 |
* Prevents involuntary endless loop using operands with |n modifier.
|
1019 |
-
* Prevents third-party plugins affecting the redirection to the thank you page (Professional, Developer and Platinum distributions).
|
1020 |
-
|
1021 |
-
= 1.1.122 =
|
1022 |
-
|
1023 |
-
* Loads the font files locally instead of Google Fonts.
|
1024 |
-
* Fixes an issue with Phone fields.
|
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.132
|
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.132 =
|
969 |
+
|
970 |
+
* Modifies the slider controls and dependencies.
|
971 |
+
* Rounds the seconds in the DECIMALTOTIME operation.
|
972 |
+
* Implements the ISIGNORED and ISHIDDEN operations.
|
973 |
+
* Allows accessing the variations prices in WooCommerce products (CFF - WooCommerce add-on, Developer, and Platinum plugin versions).
|
974 |
+
|
975 |
= 1.1.131 =
|
976 |
|
977 |
* Modifies the slider, checkbox, radio buttons, and dropdown controls.
|
1023 |
* Implements two new operations CFFCOUNTIF and CFFFILTER.
|
1024 |
* Fixes a minor issue in the advanced equations editor.
|
1025 |
* Prevents involuntary endless loop using operands with |n modifier.
|
1026 |
+
* Prevents third-party plugins affecting the redirection to the thank you page (Professional, Developer and Platinum distributions).
|
|
|
|
|
|
|
|
|
|
changelog.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.1.131 =
|
4 |
|
5 |
* Modifies the slider, checkbox, radio buttons, and dropdown controls.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.1.132 =
|
4 |
+
|
5 |
+
* Modifies the slider controls and dependencies.
|
6 |
+
* Rounds the seconds in the DECIMALTOTIME operation.
|
7 |
+
* Implements the ISIGNORED and ISHIDDEN operations.
|
8 |
+
* Allows accessing the variations prices in WooCommerce products (CFF - WooCommerce add-on, Developer, and Platinum plugin versions).
|
9 |
+
|
10 |
= 1.1.131 =
|
11 |
|
12 |
* Modifies the slider, checkbox, radio buttons, and dropdown controls.
|
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.
|
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.
|
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.132
|
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.132' );
|
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 ) );
|
css/stylepublic.css
CHANGED
@@ -540,7 +540,7 @@
|
|
540 |
.pac-container {z-index: 9999 !important;}
|
541 |
|
542 |
#fbuilder .select2-search--inline *{border:0 !important; background:transparent !important;box-shadow:none !important;padding:0 !important;}
|
543 |
-
#fbuilder .cff-select2-container{display:block;position:relative;}
|
544 |
#fbuilder .select2-container{top:0 !important;left:0 !important;}
|
545 |
#fbuilder .select2-dropdown .select2-search__field{width:100% !important;}
|
546 |
#fbuilder .select2-dropdown .select2-search__field{width:100% !important;}
|
540 |
.pac-container {z-index: 9999 !important;}
|
541 |
|
542 |
#fbuilder .select2-search--inline *{border:0 !important; background:transparent !important;box-shadow:none !important;padding:0 !important;}
|
543 |
+
#fbuilder .cff-select2-container{display:block;position:relative;z-index:999999;}
|
544 |
#fbuilder .select2-container{top:0 !important;left:0 !important;}
|
545 |
#fbuilder .select2-dropdown .select2-search__field{width:100% !important;}
|
546 |
#fbuilder .select2-dropdown .select2-search__field{width:100% !important;}
|
inc/cpcff_main.inc.php
CHANGED
@@ -265,20 +265,22 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
265 |
add_submenu_page( 'cp_calculated_fields_form', 'Online Help', 'Online Help', 'manage_options', 'cp_calculated_fields_form_sub_forum', array( $this, 'admin_pages' ) );
|
266 |
|
267 |
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
|
268 |
-
|
269 |
-
|
270 |
-
if (
|
271 |
-
|
272 |
-
|
273 |
-
|
|
|
|
|
274 |
}
|
275 |
-
}
|
276 |
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
282 |
}
|
283 |
}
|
284 |
}
|
265 |
add_submenu_page( 'cp_calculated_fields_form', 'Online Help', 'Online Help', 'manage_options', 'cp_calculated_fields_form_sub_forum', array( $this, 'admin_pages' ) );
|
266 |
|
267 |
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
|
268 |
+
if ( ! empty( $submenu ) && is_array( $submenu ) && ! empty( $submenu["cp_calculated_fields_form"] ) ) {
|
269 |
+
foreach ( $submenu["cp_calculated_fields_form"] as $index => $item ) {
|
270 |
+
if ( 'cp_calculated_fields_form_sub_marketplace' == $item[2] ) {
|
271 |
+
if ( isset( $item[4] ) ) {
|
272 |
+
$submenu["cp_calculated_fields_form"][ $index ][4] .= ' calculated-fields-form-submenu-marketplace';
|
273 |
+
} else {
|
274 |
+
$submenu["cp_calculated_fields_form"][ $index ][] = 'calculated-fields-form-submenu-marketplace';
|
275 |
+
}
|
276 |
}
|
|
|
277 |
|
278 |
+
if ( 'cp_calculated_fields_form_sub_upgrade' == $item[2] ) {
|
279 |
+
if ( isset( $item[4] ) ) {
|
280 |
+
$submenu["cp_calculated_fields_form"][ $index ][4] .= ' calculated-fields-form-submenu-upgrade';
|
281 |
+
} else {
|
282 |
+
$submenu["cp_calculated_fields_form"][ $index ][] = 'calculated-fields-form-submenu-upgrade';
|
283 |
+
}
|
284 |
}
|
285 |
}
|
286 |
}
|
js/fbuilder-pro-public.jquery.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
$.fbuilder['version'] = '1.1.
|
2 |
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
1 |
+
$.fbuilder['version'] = '1.1.132';
|
2 |
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
js/fields-admin/06_fbuilder.fcheck.js
CHANGED
@@ -102,7 +102,7 @@
|
|
102 |
{
|
103 |
if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
|
104 |
{
|
105 |
-
e.data.obj.choicesDep[$(this).attr("i")][
|
106 |
}
|
107 |
else
|
108 |
{
|
102 |
{
|
103 |
if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
|
104 |
{
|
105 |
+
e.data.obj.choicesDep[$(this).attr("i")]=[];
|
106 |
}
|
107 |
else
|
108 |
{
|
js/fields-admin/07_fbuilder.fradio.js
CHANGED
@@ -98,7 +98,7 @@
|
|
98 |
{
|
99 |
if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
|
100 |
{
|
101 |
-
e.data.obj.choicesDep[$(this).attr("i")][
|
102 |
}
|
103 |
else
|
104 |
{
|
98 |
{
|
99 |
if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
|
100 |
{
|
101 |
+
e.data.obj.choicesDep[$(this).attr("i")]=[];
|
102 |
}
|
103 |
else
|
104 |
{
|
js/fields-admin/08_fbuilder.fdropdown.js
CHANGED
@@ -102,7 +102,7 @@
|
|
102 |
{
|
103 |
if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
|
104 |
{
|
105 |
-
e.data.obj.choicesDep[$(this).attr("i")][
|
106 |
}
|
107 |
else
|
108 |
{
|
102 |
{
|
103 |
if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
|
104 |
{
|
105 |
+
e.data.obj.choicesDep[$(this).attr("i")]=[];
|
106 |
}
|
107 |
else
|
108 |
{
|
js/fields-public/02_fbuilder.fslider.js
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
{
|
28 |
if(v == 0) return v;
|
29 |
var el = $('#'+this.name+'_slider'),
|
30 |
-
step = el.slider('option', 'step'),
|
31 |
min = Math.max(el.slider('option', 'min'), step),
|
32 |
max = FLOOR(el.slider('option', 'max')/step)*step,
|
33 |
|
@@ -40,7 +40,7 @@
|
|
40 |
_inverse : function(v)
|
41 |
{
|
42 |
var el = $('#'+this.name+'_slider'),
|
43 |
-
step = el.slider('option', 'step'),
|
44 |
min = Math.max(el.slider('option', 'min'), step),
|
45 |
max = FLOOR(el.slider('option', 'max')/step)*step,
|
46 |
|
@@ -125,6 +125,10 @@
|
|
125 |
this._setHndl('max');
|
126 |
this._setHndl('step');
|
127 |
this.centSeparator = (/^\s*$/.test(this.centSeparator)) ? '.' : $.trim(this.centSeparator);
|
|
|
|
|
|
|
|
|
128 |
},
|
129 |
show:function()
|
130 |
{
|
@@ -259,6 +263,10 @@
|
|
259 |
{
|
260 |
try{
|
261 |
if(ignore) v = 1;
|
|
|
|
|
|
|
|
|
262 |
$('[id="'+this.name+'_slider"]').slider("option", "step", v);
|
263 |
}
|
264 |
catch(err){}
|
27 |
{
|
28 |
if(v == 0) return v;
|
29 |
var el = $('#'+this.name+'_slider'),
|
30 |
+
step = this.calc_step, // el.slider('option', 'step'),
|
31 |
min = Math.max(el.slider('option', 'min'), step),
|
32 |
max = FLOOR(el.slider('option', 'max')/step)*step,
|
33 |
|
40 |
_inverse : function(v)
|
41 |
{
|
42 |
var el = $('#'+this.name+'_slider'),
|
43 |
+
step = this.calc_step, // el.slider('option', 'step'),
|
44 |
min = Math.max(el.slider('option', 'min'), step),
|
45 |
max = FLOOR(el.slider('option', 'max')/step)*step,
|
46 |
|
125 |
this._setHndl('max');
|
126 |
this._setHndl('step');
|
127 |
this.centSeparator = (/^\s*$/.test(this.centSeparator)) ? '.' : $.trim(this.centSeparator);
|
128 |
+
if(this.logarithmic && !isNaN(this.step)) { // TO CHECK
|
129 |
+
this.calc_step = this.step;
|
130 |
+
this.step = Math.min(this.step, 1);
|
131 |
+
}
|
132 |
},
|
133 |
show:function()
|
134 |
{
|
263 |
{
|
264 |
try{
|
265 |
if(ignore) v = 1;
|
266 |
+
if(this.logarithmic) { // TO CHECK
|
267 |
+
this.calc_step = v;
|
268 |
+
v = Math.min(v,1);
|
269 |
+
}
|
270 |
$('[id="'+this.name+'_slider"]').slider("option", "step", v);
|
271 |
}
|
272 |
catch(err){}
|
js/fields-public/06_fbuilder.fcheck.js
CHANGED
@@ -18,7 +18,8 @@
|
|
18 |
{
|
19 |
this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices);
|
20 |
var str = "",
|
21 |
-
classDep
|
|
|
22 |
|
23 |
if (typeof this.choicesDep == "undefined" || this.choicesDep == null)
|
24 |
this.choicesDep = new Array();
|
@@ -26,7 +27,7 @@
|
|
26 |
for (var i=0, h=this.choices.length; i<h; i++)
|
27 |
{
|
28 |
if(typeof this.choicesDep[i] != 'undefined')
|
29 |
-
this.choicesDep[i] = $.grep(this.choicesDep[i],function(
|
30 |
else
|
31 |
this.choicesDep[i] = [];
|
32 |
|
18 |
{
|
19 |
this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices);
|
20 |
var str = "",
|
21 |
+
classDep,
|
22 |
+
n = this.name.match(/fieldname\d+/)[0];
|
23 |
|
24 |
if (typeof this.choicesDep == "undefined" || this.choicesDep == null)
|
25 |
this.choicesDep = new Array();
|
27 |
for (var i=0, h=this.choices.length; i<h; i++)
|
28 |
{
|
29 |
if(typeof this.choicesDep[i] != 'undefined')
|
30 |
+
this.choicesDep[i] = $.grep(this.choicesDep[i],function(x){ return x != "" && x != n; });
|
31 |
else
|
32 |
this.choicesDep[i] = [];
|
33 |
|
js/fields-public/07_fbuilder.fradio.js
CHANGED
@@ -23,7 +23,8 @@
|
|
23 |
|
24 |
var l = this.choices.length,
|
25 |
str = "",
|
26 |
-
classDep = ""
|
|
|
27 |
|
28 |
if (typeof this.choicesDep == "undefined" || this.choicesDep == null)
|
29 |
this.choicesDep = new Array();
|
@@ -31,7 +32,7 @@
|
|
31 |
for (var i=0;i<l;i++)
|
32 |
{
|
33 |
if(typeof this.choicesDep[i] != 'undefined')
|
34 |
-
this.choicesDep[i] = $.grep(this.choicesDep[i],function(
|
35 |
else
|
36 |
this.choicesDep[i] = [];
|
37 |
|
23 |
|
24 |
var l = this.choices.length,
|
25 |
str = "",
|
26 |
+
classDep = "",
|
27 |
+
n = this.name.match(/fieldname\d+/)[0];
|
28 |
|
29 |
if (typeof this.choicesDep == "undefined" || this.choicesDep == null)
|
30 |
this.choicesDep = new Array();
|
32 |
for (var i=0;i<l;i++)
|
33 |
{
|
34 |
if(typeof this.choicesDep[i] != 'undefined')
|
35 |
+
this.choicesDep[i] = $.grep(this.choicesDep[i],function(x){ return x != "" && x != n; });
|
36 |
else
|
37 |
this.choicesDep[i] = [];
|
38 |
|
js/fields-public/08_fbuilder.fdropdown.js
CHANGED
@@ -24,7 +24,8 @@
|
|
24 |
op_o = false,
|
25 |
l = c.length,
|
26 |
classDep = '',
|
27 |
-
str = ''
|
|
|
28 |
|
29 |
if (typeof this.choicesDep == "undefined" || this.choicesDep == null)
|
30 |
this.choicesDep = new Array();
|
@@ -32,7 +33,7 @@
|
|
32 |
for (var i=0;i<l;i++)
|
33 |
{
|
34 |
if(typeof this.choicesDep[i] != 'undefined' && (typeof og[i] == 'undefined' || !og[i]))
|
35 |
-
this.choicesDep[i] = $.grep(this.choicesDep[i],function(
|
36 |
else
|
37 |
this.choicesDep[i] = [];
|
38 |
|
24 |
op_o = false,
|
25 |
l = c.length,
|
26 |
classDep = '',
|
27 |
+
str = '',
|
28 |
+
n = this.name.match(/fieldname\d+/)[0];
|
29 |
|
30 |
if (typeof this.choicesDep == "undefined" || this.choicesDep == null)
|
31 |
this.choicesDep = new Array();
|
33 |
for (var i=0;i<l;i++)
|
34 |
{
|
35 |
if(typeof this.choicesDep[i] != 'undefined' && (typeof og[i] == 'undefined' || !og[i]))
|
36 |
+
this.choicesDep[i] = $.grep(this.choicesDep[i],function(x){ return x != "" && x != n; });
|
37 |
else
|
38 |
this.choicesDep[i] = [];
|
39 |
|
js/modules/02_datetime/public/01_datetime.js
CHANGED
@@ -403,7 +403,7 @@
|
|
403 |
if(d){ components['d'] = complete(FLOOR(value/(24*60*60)), d); value = value%(24*60*60);}
|
404 |
if(h){ components['h'] = complete(FLOOR(value/(60*60)), h); value = value%(60*60);}
|
405 |
if(i){ components['i'] = complete(FLOOR(value/60), i); value = value%60;}
|
406 |
-
if(s){ components['s'] = complete(value, s);}
|
407 |
|
408 |
for(var index in components)
|
409 |
{
|
403 |
if(d){ components['d'] = complete(FLOOR(value/(24*60*60)), d); value = value%(24*60*60);}
|
404 |
if(h){ components['h'] = complete(FLOOR(value/(60*60)), h); value = value%(60*60);}
|
405 |
if(i){ components['i'] = complete(FLOOR(value/60), i); value = value%60;}
|
406 |
+
if(s){ components['s'] = complete(FLOOR(value), s);}
|
407 |
|
408 |
for(var index in components)
|
409 |
{
|
js/modules/05_managing_fields/admin/module_admin.js
CHANGED
@@ -33,6 +33,11 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ] = {
|
|
33 |
"code" : "ACTIVATEFIELD(",
|
34 |
"tip" : "<p>Activates a field explicitly, similar to dependencies. <strong>ACTIVATEFIELD( # or fieldname#, form or form selector )</strong></p><p>Activates the field for the equations and submission. 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 apply the activates action to the field in the first form of the page. For example: ACTIVATEFIELD(1); or ACTIVATEFIELD("fieldname1");</p>"
|
35 |
},
|
|
|
|
|
|
|
|
|
|
|
36 |
{
|
37 |
"value" : "HIDEFIELD",
|
38 |
"code" : "HIDEFIELD(",
|
@@ -43,6 +48,11 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ] = {
|
|
43 |
"code" : "SHOWFIELD(",
|
44 |
"tip" : "<p>Show a field explicitly. If the field was hidden by a dependency or by the IGNOREFIELD operation, it must be displayed by the ACTIVATEFIELD operation. <strong>SHOWFIELD( # or fieldname#, form or form selector )</strong></p><p>The first parameter is required. It is 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 display the field in the first form on the page. For example: SHOWFIELD(1); or SHOWFIELD("fieldname1");</p>"
|
45 |
},
|
|
|
|
|
|
|
|
|
|
|
46 |
{
|
47 |
"value" : "VALIDFORM",
|
48 |
"code" : "VALIDFORM(",
|
33 |
"code" : "ACTIVATEFIELD(",
|
34 |
"tip" : "<p>Activates a field explicitly, similar to dependencies. <strong>ACTIVATEFIELD( # or fieldname#, form or form selector )</strong></p><p>Activates the field for the equations and submission. 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 apply the activates action to the field in the first form of the page. For example: ACTIVATEFIELD(1); or ACTIVATEFIELD("fieldname1");</p>"
|
35 |
},
|
36 |
+
{
|
37 |
+
"value" : "ISIGNORED",
|
38 |
+
"code" : "ISIGNORED(",
|
39 |
+
"tip" : "<p>Return true if the fields is ignored. <strong>ISIGNORED( # 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 check if the field in the first form of the page is ignored. For example: ISIGNORED(1); or ISIGNORED("fieldname1");</p>"
|
40 |
+
},
|
41 |
{
|
42 |
"value" : "HIDEFIELD",
|
43 |
"code" : "HIDEFIELD(",
|
48 |
"code" : "SHOWFIELD(",
|
49 |
"tip" : "<p>Show a field explicitly. If the field was hidden by a dependency or by the IGNOREFIELD operation, it must be displayed by the ACTIVATEFIELD operation. <strong>SHOWFIELD( # or fieldname#, form or form selector )</strong></p><p>The first parameter is required. It is 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 display the field in the first form on the page. For example: SHOWFIELD(1); or SHOWFIELD("fieldname1");</p>"
|
50 |
},
|
51 |
+
{
|
52 |
+
"value" : "ISHIDDEN",
|
53 |
+
"code" : "ISHIDDEN(",
|
54 |
+
"tip" : "<p>Return true if the fields is hidden. The field can be hidden by dependencies, CSS rules, or because it is in another page of a multipage form. <strong>ISHIDDEN( # 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 check if the field in the first form of the page is hidden. For example: ISHIDDEN(1); or ISHIDDEN("fieldname1");</p>"
|
55 |
+
},
|
56 |
{
|
57 |
"value" : "VALIDFORM",
|
58 |
"code" : "VALIDFORM(",
|
js/modules/05_managing_fields/public/05_managing_fields.js
CHANGED
@@ -115,6 +115,13 @@
|
|
115 |
}
|
116 |
};
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
lib.showfield = lib.SHOWFIELD = function( _field, _form )
|
119 |
{
|
120 |
var f = _getField(_field, _form), j;
|
@@ -137,7 +144,14 @@
|
|
137 |
}
|
138 |
};
|
139 |
|
140 |
-
lib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
{
|
142 |
jQuery(f || '[id*="cp_calculatedfieldsf_pform_"]').attr('data-evalequations',0);
|
143 |
};
|
115 |
}
|
116 |
};
|
117 |
|
118 |
+
lib.isignored = lib.ISIGNORED = function( _field, _form )
|
119 |
+
{
|
120 |
+
var o = _getForm(_form), f = _getField(_field, _form), j;
|
121 |
+
if(f) return 0 < f.jQueryRef().find('.ignore').length;
|
122 |
+
return false;
|
123 |
+
};
|
124 |
+
|
125 |
lib.showfield = lib.SHOWFIELD = function( _field, _form )
|
126 |
{
|
127 |
var f = _getField(_field, _form), j;
|
144 |
}
|
145 |
};
|
146 |
|
147 |
+
lib.ishidden = lib.ISHIDDEN = function( _field, _form )
|
148 |
+
{
|
149 |
+
var o = _getForm(_form), f = _getField(_field, _form), j;
|
150 |
+
if(f) return f.jQueryRef().is(':hidden');
|
151 |
+
return true;
|
152 |
+
};
|
153 |
+
|
154 |
+
lib.disableequations = lib.DISABLEEQUATIONS = function(f)
|
155 |
{
|
156 |
jQuery(f || '[id*="cp_calculatedfieldsf_pform_"]').attr('data-evalequations',0);
|
157 |
};
|