A beginner question, what files do I need to change to implement the promo code below?
Form to be changed: https://aneededride.com/membership/
Topic: http://www.gravityhelp.com/forums/topic/total-wont-update-on-gform_product_total
Code:
<?php
add_filter( 'gform_pre_render_2', 'joe_ind_js');
function joe_ind_js($form) {
echo <<<END
<script type="text/javascript">
jQuery(document).ready(function($){
$("#input_2_26").change(function(){
gformCalculateTotalPrice(2);
});
});
function gform_product_total( formId, total) {
if(jQuery("#input_2_26").val().toLowerCase() == 'xyzpromo' )
total -= 30;
return total;
}
</script>
END;
return $form;
}
Thank You.