So now that the Total field works again with Otto's Simple Facebook Connect plugin, it doesn't appear to update when I enter a promo code. This used to work. I tested this in Preview, and it doesn't work there, either.
Here is the code:
add_filter( 'gform_pre_render_2', 'joe_ind_js' );
function joe_ind_js( $c ) {
echo <<<END
<script type="text/javascript">
function gform_product_total( formId, total) {
if(jQuery("#input_2_26").val().toLowerCase() == 'xyzpromo' )
total -= 30;
return total;
}
</script>
END;
return $c;
}
One caveat I'll note: This script does work if I fill in the promo code and refresh the screen. Once refreshed, the promo code field is still filled in with the correct promo code.