Tell us what you are trying to do?
Website users have a custom field "company" (select). When user create a post via custom post form, automatically fill the cred post field "company" (taxonomy) with a value from user's company field.
And after that give access to edit/delete posts only for users with the same companies (post company = user company)
Where you insert a taxonomy field in a post form (with the cred_field shortcode) you cannot pre-set a value, the value attribute is only available on custom fields.
So the only way to automatically set the taxonomy based upon some user field of the person submitting the form is to omit the taxonomy from the form and set it after the form has been submitted, using the Forms API.
So you would use cred_save_data to hook into the submission process, by which time the post has been created, and so you can get the value of the user country field and set the country term on the post accordingly.
And after that give access to edit/delete posts only for users with the same companies (post company = user company)
It isn't possible to limit access in such a way. However, if your users are creating the posts and so are authors of the post, you can use Access so that users can only edit/delete their own posts.
Thanks for your reply! I solved the problem by my own. I'm using a js script to assaign the value from user's Company field to post. And Conditional output to control access to edit button and check if user's Company equal post's Company.
Is it possible to use cred_save_data via Toolset's GUI?