最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wordpress - save gravity forms calculation values in the database - Stack Overflow

programmeradmin0浏览0评论

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?

Share Improve this question asked yesterday TommymviTommymvi 91 bronze badge New contributor Tommymvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

1 Answer 1

Reset to default 0

When 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.

发布评论

评论列表(0)

  1. 暂无评论