Replies: 2 comments
-
What's the use case for that? Don't think that's a priority - sorry ;) especially for "sync" sound more like a thing maybe solved with a relationship or "default" values? |
Beta Was this translation helpful? Give feedback.
-
Use case for synchronizing database fields? I assume I don't have to explain that people want to let one database field assume the value of another. So perhaps I misunderstand your question? Perhaps you need examples? That's just one case. |
Beta Was this translation helpful? Give feedback.
-
Issue Overview
Looking for a way to let a Pods field assume the value of another field in the WordPress database (Pods field or non-Pods field) through defining fields in the Pods GUI.
Possible Solution
How I would love to see it work:
When defining a field in the Pods GUI, I'd simply set the 'Field Type' to 'database field', select the field, and boom, it simply takes that field value. A selection field 'sync fields permanently' allows this to be a once-off sync or always sync the values of these fields. A dropdown box would additionally gives these choices: 'sync both ways', 'slave' or 'master'.
Since Pods allows to define fields, and recognizes many field types, I think it's logical to let Pods define this type of field too.
Related Issues and/or PRs
I checked with @jimtrue: the above solution currently does not exist in the Pods GUI. The alternative method of using the pre_save filter or a post_save action hook (https://pods.io/docs/code/filter-reference/pods_api_pre_save_pod_item_podname) therefore does not offer a solution.
Beta Was this translation helpful? Give feedback.
All reactions