We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gpecf-deduct-deposit.php
1 parent cc6d0dd commit ab19aaaCopy full SHA for ab19aaa
gp-ecommerce-fields/gpecf-deduct-deposit.php
@@ -72,6 +72,11 @@ public function output_script() {
72
self.init = function() {
73
gform.addFilter( 'gform_product_total', function( total, formId ) {
74
if ( formId == self.formId ) {
75
+ // If deposit is disabled or hidden, return total as it is.
76
+ if ( $( 'input[name="input_' + self.depositFieldId + '.2"]' ).is( ':disabled' ) ) {
77
+ return total;
78
+ }
79
+
80
var depositPrice = $( 'input[name="input_' + self.depositFieldId + '.2"]' ).val();
81
var depositQuantity = $( 'input[name="input_' + self.depositFieldId + '.3"]' ).val();
82
0 commit comments