You rock!! Thank you!
Unfortunately I had to hack a bit of the core code to get everything working just the way I needed it to, but good news is, I think I now have a way to link my saved form to a logged-in user's profile (so the user can come back and edit the form / resubmit later). In any case this is working for me. :-)
Here's what I had to do to achieve it:
UPDATE - see this post for a revised solution:
http://www.gravityhelp.com/forums/topic/saving-a-form#post-32318
- In your form, go into each field's Advanced tab and click "Allow Field to be Populated Dynamically. Enter a parameter name - it can be anything, but should be unique.
- Change line 909 of forms_model.php to read:
return apply_filters("gform_field_value_$name", apply_filters("gform_field_value", $value, $name));
- Add the following to your theme's functions.php file:
- Now when logged-in users fill out a form, they should be able to return to that same form later and have all their previous answers pre-populated.
The way the filter is rewritten should allow users to use both the gform_field_value filter and the original gform_field_value_your_parameter filter - the latter will overwrite the former.
Let me know if you can think of a better way to do this - any of it - and/or if there's a way I can move that rewritten filter into my local functions.php file. I hate to edit the core code, just couldn't see a way around it in this instance.
Thanks again for your help!
Michelle
Posted 13 years ago on Wednesday August 10, 2011 |
Permalink