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.

After Form Submit keep fields populated

  1. I need to have the form keep the form fields populated after hitting calculate on the form itself.

    Currently the user enter Amount Financed and Down Payment, but they disappaear after submitting.

    I know there is a way to achieve this, but I have tried multiple times with forum examples and other people having similar issues.

    Current Form URL: http://whitebridgefinancial.com/anf2/

    Current PHP Code:

    <div class="payment_calculator">
    			<h1>Payment Calculator.</h1>
    			<div class="payment_success_text">
    			<?php
    			// Define initial loan variables
    				$p = $_GET['subtotal'];
    				$n = $_GET['number'];
    				$r = $_GET['rate'];
    
    			// Prep for equation
    				$n = $n * 12;
    				$r = $r /1200;
    				$r1 = $r + 1;
    
    			// Equation
    				$a = @($r + ($r / (pow($r1,$n) - 1))) * $p;
    
    			// total payment amount (non-formatted)
    				$t = $n * $a;
    
    			// Format the numbers
    				$a = number_format($a, 2, '.', ',');
    				$t = number_format($t, 2, '.', ',');
    
    				echo do_shortcode('[gravityform id="12" title="false" name="false" description="false"]'); 
    
    				if($a > 0) {
    				echo 'Your Monthly Payment = $' .$a. '';
    
    			}
    
    			?>
    
    			</div>
    		</div>

    Any help would be GREATLY appreciated.

    Much Thanks, Mike

    Posted 6 years ago on Wednesday February 6, 2013 | Permalink
  2. What have you tried so far? Is it different than this code? Can you provide links to the examples you were trying to follow? Thank you.

    Posted 6 years ago on Wednesday February 6, 2013 | Permalink