If I have a form where the user first creates the category "Company XYZ" and submits it, is it possible for this to become the title of a new Post?
Yes, this is possible in multiple ways.
What you need is to hook into the cred_save_data() documented here:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
This hook allows you to manipulate the Post at the moment CRED saved the Post to the Database.
This means, you can either grab the data from the form accessing $_POST, or from the database itself, and then updating the post in the database using the usual WordPress API.
As example to get the value from a Custom Field, filled during submit, and update the Title with it, you would use:
- data from $_POST or get_post_meta()
- wp_update_post() to update the Post Title
It's easiest to get the data from $_POST, you just need to access the right field slug.
Or, from the database, using the WordPress API.
For taxonomies they have this function:
https://codex.wordpress.org/Function_Reference/wp_get_post_terms
From that, you can use the below to update the post title:
https://codex.wordpress.org/Function_Reference/wp_update_post
Here are some reference snippet:
https://pastebin.com/KjW2y826
https://pastebin.com/2BTbVbcs
https://pastebin.com/A2UMXVUJ
Another option, is it possible for a user submitted form to contain the term fields or are term fields only on the back-end.
It is currently not possible to add, edit or else how manipulate User and Term Fields in the Front End with CRED, but both are requested features, and will be implemented at some point in the future.
I added your voice to the requests.
I'm using this in functions - can you for see any problems?
1. You are using save_post() which does not hook into CRED Code but into the WordPress code fired when a post is added or updated (usually in the backend)
2. The code to me seems to insert terms according values of other terms. Not what you want.