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.

New Form beneath confirmation message

  1. sidjags
    Member

    Is it possible to give a blank new form right beneath the confirmation message one gets after submitting a form (assuming i, the admin, have selected the option of "text"... not redirect, or any other page....)

    so.. i fill out the form, it says thank you... and gives me an option to fill it out again...

    am using this for a user to send a post... so, he could technically want to send another post right after he finishes this one...

    sid

    Posted 13 years ago on Sunday December 11, 2011 | Permalink
  2. The confirmation text supports shortcodes, so you can put the shortcode to a form in there. Just copy it from the post editor and paste it in there. Let us know if you can make that work.

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  3. sidjags
    Member

    nope... when i put in the shortcode:
    [gravityform id=1 title=false description=false ajax=true] (where my form id # is 1)... the form doesnt even submit... i fill it up, click submit... and it just freezes...

    but i did come across a similar question ove rhere: http://www.gravityhelp.com/forums/topic/how-can-i-show-the-form-after-submission

    they are putting up a link which comes along with the confirmation message... and once clicked, will load the form again... however the code doesnt seem to work for me... they ask to put a snippet of code into functions.php... but when i do so... my entire wordpress install goes for a toss... get a white blank screen...

    could you please help me out here by pointing in the right direction?!

    sid

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  4. The white screen is due to invalid code causing a 500 Internal Server Error. So, the code is being inserted incorrectly. If you post your complete functions.php to pastebin.com or pastie.org and we'll take a look at the syntax for you.

    Posted 13 years ago on Monday December 12, 2011 | Permalink
  5. minicast
    Member

    This is how I do it:

    /** GRAVITY FORMS MODIFICATIONS (add this to your functions.php)
    / ================================================================================ */
    
    // This disables the anchor on form submission
    add_filter("gform_confirmation_anchor", create_function("","return false;"));
    
    // change the number on "gform_pre_render_1" to match the ID of your form.
    add_filter('gform_pre_render_1', 'save_form_html');
    
    function save_form_html($form) {
    
    	if(isset($_POST["gform_ajax"]))
    		return $form;
    
    	$form_id = $form['id']; ?>
    
    	<script type="text/javascript">
    	jQuery(document).ready(function(a){
    		if(typeof gform_html == 'undefined')
    			var gform_html = new Array();
    		gform_html['<?php echo $form_id; ?>'] = a('#gform_wrapper_<?php echo $form_id; ?>').wrap('<div></div>').parent().html();
    		a(document).bind('gform_confirmation_loaded', function(){
    			a('.gform_confirmation_message_<?php echo $form_id; ?>').parent().append(gform_html['<?php echo $form_id; ?>']);
    			setTimeout(function(){a(".gform_confirmation_message_<?php echo $form_id; ?>").fadeTo("slow",0,function(){a(this).slideUp("slow",function(){a(this).remove()})})},3E3);
    		})
        });
    	</script>
    
    <?php return $form;
    }
    Posted 12 years ago on Monday November 19, 2012 | Permalink