PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Dynamic Confirmation Message doesnt work.

  1. ykotlar
    Member

    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);
    
    	}
    Posted 13 years ago on Monday December 12, 2011 | Permalink
  2. ykotlar
    Member

    Ok, end up using the redirect. Added hidden field which hold page ID parameter from URL, and then re-added the captured ID to redirect URL parameter. Though need to do it in each form.

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  3. You seem to be working through all your issues. Do you need help with this one though or are you OK with your solution?

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  4. ykotlar
    Member

    Hi, that is just my temporary solution, since its rush. And still looking for fix.

    Posted 13 years ago on Monday December 12, 2011 | Permalink