Gravityforms Save and Continue Prepopluate Email Address
Overview
In this article you'll learn how to create a special form where users can save default field values which other forms can use to pre-populate their fields.
Requirements
Please make sure you have installed these plugins/add-ons before following this article:
- Gravity Forms plugin with Elite License ($259/year)
- Gravity Forms User Registration Add-on (Free if you have Gravity Forms Elite License)
Creating a "Default Settings" Form
Go ahead and create new form Forms => New Form.
Now we have to add fields we want users to be able to save as their default values.
As an example I have added 3 fields:
- My Music Taste
- My Movie Taste
- My Hobbies
Make sure to click Update after you finish adding your fields.
Now we have to make these field values permanent. To do that, in Gravity Forms Editor navigate to Settings tab and click on User Registration.
These User Registration Feeds serve to save values entered by the user which we will later use to auto-fill some fields in other forms. To add a new feed, click on Add New button.
In theFeed Settings editor give your feed some meaningful name and click on theUpdate User button.
User Settings
If you want to update a user's data through this form, you can use these fields. Otherwise just skip them. We will skip them in this article since we are only using custom fields.
User Meta
To make our 3 fields permanent values we will assign those fields as User Meta values. First select one of your fields in theSelect a Field drop-down. Then select theAdd Custom Meta in theSelect Meta Key drop-down.
Now give your meta key a name that is related to the field, for example "hobbies" ( I advise you always use lower caps letters only, and an underscore ( _ ) if you want to use more than one word when assigning meta key names eg. "my_hobbies" ).
Repeat this for all your fields
Additional Options
LeaveUpdate Conditionunchecked.
When you are done with the steps above, click on theUpdate Settingsbutton. Now you can close this form.
Pre-filled fields
I have created anotherFormwhose fields should be pre-filled with theDefault Settingsform's fields we created above.
To make those fields pre-filled by the values we enter in our Default Settings form, we have to give them a Default Value attribute.
To do this click on one of your fields and click onAdvancedtab. UnderDefault Valueyou should use this code: {user:YOUR_META_KEY} and replace YOUR_META_KEY with your meta key.
In this case, because I setMy Hobbies meta keyas hobbies, I'll have to enter {user:hobbies}
Repeat this for all other fields.
When you are done, click onUpdatebutton. And now fields on this form will be pre-filled.
Result
Default Settings Form Page
Create a new page and add the Default Form we created in the first step. Open it and enter something in the fields.
Click Submit and your values should be saved and will be pre-filled in the fields you specified.
Regular Form Page
Open your regular form page—the one we edited in step 2. And now the fields where you added your {user:META_KEY} merge tags as theDefault Valuewill be pre-filled!
If it's not working please make sure you are using the samemeta keyname in theUser Registration Settingsof yourDefault Valuesform and in yourRegularform fields as theDefault Values {user:meta_key}.
If it's still not working, repeat all the steps above and make sure you did everything correctly. Or, leave a comment below and we'll help. 🙂
Video walkthrough
Conclusion
With this feature, your users and members will no longer have to waste time on entering values each time they want to submit a form.
For example if you have a checkout form with some custom fields that a user fills with the same values each time they make a purchase, it will be pre-filled with the values they save in theDefault Valuesform. Or, if you run a service where your customers log into a backend and submit orders or various details to you, this approach can improve the user experience for your customers.
Finally, if you'd like our team to set this up for you (and save yourself the cost of GravityForms) take a look at our MemberFix service and get us to do it for you!
Source: https://memberfix.rocks/save-fields-gravityforms/
0 Response to "Gravityforms Save and Continue Prepopluate Email Address"
Post a Comment