Hello,
I need to create a custom field where the content have to be the HASH key calculated from the file of another custom field (a file type).
It's really simple, in theory, but I can't find any tool which allow me to do this. Do you have any idea how I can resolve it ? A line of code ? The HASH would be SHA512
Thanks
Hello,
There isn't such a built-in feature within Toolset plugins, it needs custom PHP codes, I suggest you try with wordpress action hook "save_post" to store the "HASH key calculated" value into the custom field.
For example:
1) When user create/edit a post, use action hook "save_post" to trigger a custom PHP function:
https://codex.wordpress.org/Plugin_API/Action_Reference/save_post
2) in this custom PHP function, you can get the "another custom field" field value:
https://developer.wordpress.org/reference/functions/get_post_meta/
Then setup custom PHP codes to get the HASH key calculated value, and save it into the custom field:
https://developer.wordpress.org/reference/functions/update_post_meta/
If your are using Toolset form to create/edit the post, you can try the action hook cred_save_data:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
For your reference.