I am using Gravity Forms to create a form that includes calculated fields. While the calculations work fine, I need to ensure that the calculated values are saved in the database so they can be retrieved later.
How can I ensure that calculated values are saved in Gravity Forms entries?
If storing in a custom table, what’s the best way to do it?
If saving to user meta, how should I link it to logged-in users?
Should I use gform_pre_submission?
If I want to save the values in user meta, what’s the correct approach?
I am using Gravity Forms to create a form that includes calculated fields. While the calculations work fine, I need to ensure that the calculated values are saved in the database so they can be retrieved later.
How can I ensure that calculated values are saved in Gravity Forms entries?
If storing in a custom table, what’s the best way to do it?
If saving to user meta, how should I link it to logged-in users?
Should I use gform_pre_submission?
If I want to save the values in user meta, what’s the correct approach?
1 Answer
Reset to default 0When you submit the form, Gravity Forms will automatically save calculated values in the generated entry. If you want to save those values to user meta, I would suggest the User Registration add-on which allows you to register new users but also update existing users, specifically the logged-in user submitting the form.
You mentioned saving data to custom tables, I'd need some elaboration there to advise.