Skip to content

Instantly share code, notes, and snippets.

@richardW8k
Last active January 1, 2016 07:49
Show Gist options
  • Save richardW8k/8114539 to your computer and use it in GitHub Desktop.
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
<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