Last active
January 1, 2016 07:49
-
-
Save richardW8k/8114539 to your computer and use it in GitHub Desktop.
Script to set shipping price as the result of a calculated number field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
gform.addFilter( 'gform_calculation_result', function(result, formulaField, formId, calcObj ){ | |
if ( formulaField.field_id == "4" ){ | |
jQuery(".ginput_shipping_price").html(gformFormatMoney(result)).prev('input').val(gformFormatMoney(result)); | |
gformCalculateTotalPrice( formId ); | |
} | |
return result; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment