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