Hi, I tried to modify form confirmation message, using pre_render and pre_submission filters. And last i tried gform_confirmation filter, still doesnt work. Its under function.php
$form_gf_ID is global form ID supplied by the page where it was attached. And it is correctly rendering and submitting. $program_id is global ID of the page where the form was attached.
Now, we need to have each form success message to have "Make Payment" upon finishing registration. And seems any filter doesnt work. (Neither Ajax on or off)
add_filter("gform_confirmation", "custom_gfkpcconfirmation", 10, 4);
function custom_gfkpcconfirmation($confirmation, $form, $lead, $ajax){
global $form_gf_ID, $program_id;
if($form['id'] == $form_gf_ID){
$confirmation = '<div class="successregclass"><h2> Registration Successful! </h2><div class="buybuttonp">'.get_the_buy_button($program_id).'
<ul class="content-details">
<li><span class="name">Cost:</span> <span class="names">'.get_the_currency().get_post_meta($program_id, 'Program_Cost', true).'</span></li>
';
}
return $confirmation;
}
add_shortcode('show_registration', 'gravityshowreg');
function gravityshowreg($att){
global $form_gf_ID, $program_id, $include_baseform;
if($form_gf_ID>0) gravity_form($form_gf_ID, true, true, false, '', true);
}