I looked in the forum for a solution but didn't find one. Lots of hints though.
So this is how I solved it.
I solved it by putting a hidden field on the first form (in my case the field ID = 41 and form ID = 4).
I then added this code to functions.php:
add_action("gform_pre_submission_4", "pre_submission_handler"); //4 is the ID of my form
function pre_submission_handler($form){
$_POST["input_41"] = date('d/m/Y | H:i:s'); // 41 is the ID of my hidden field
}
On form submission, field 41 is filled with the submission date and time.
A confirmation text message asks the user if he wants to fill it out again, with the url to the 2nd form.
This url has the merg tag of field 41 in it (amongst others), so it is sumitted to the 2nd form.
In that 2nd form (a duplicate of the first form with an extra id for the previous submission date), I'm dynamically filling that submission date I had in the 1st form.
This works great.
Posted 11 years ago on Sunday December 9, 2012 |
Permalink