The DOC does not show how to do this in one piece because it is not something Toolset does in the visible GUI.
You can achieve the logic by applying some Custom Code to Toolset Form's filters. You might be familiar with the save_post() hook of WordPress for when you want to alter the Post when saving a post. Toolset Forms provides a similar API. I'll explain below how you can achieve this.
1. Create the Toolset Form that adds those Posts, and include all fields you want the user to fill in when creating the post (or editing it)
2. Create a Custom Field with Types (not required, single line) that will be named School ID or similar. Important here, save the slug for later usage. Do not include this Field in the Toolset form (it will be included by default, hence remove it)
3. Consult https://codex.wordpress.org/Function_Reference/update_post_meta and https://developer.wordpress.org/reference/functions/get_the_title/ to get and update post data in WordPress, additionally to hidden link (to Truncate). Craft a working code that gets the post title by ID and updates to a field with slug as in #2 the new value made up of truncated title and post id.
4. Now consult the DOC for Toolset Form's save_post replacement: cred_save_data: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
You can practically insert your existing code from #3 above, by slightly altering the Post ID (in this hook you can use $post_id) and you will need to wrap some checks for being on the right form.
Below is a working example, based on a Single Line field school-id, and a form with ID 10.
Note that it does not include the sanitization as in truncating and escaping empty characters or others, as that is custom code we cannot assist, however above DOC of PHP should help here.
1. Created the Form for the post, and the field with slug school-id, which is not added to the form
2. Insert this custom snippet in your functions.php file:
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==10)//Change form id as per your requirements
{
$post_title = get_the_title( $post_id );
$school_id = $post_title . '-' . $post_id;
update_post_meta($post_id, 'wpcf-school-id', $school_id);//Important here is to add wpcf-prefx
}
}
}
Now, when the user submits the form with ID 10, the code will get the post title, its ID, concatenate it with a -, update a field school-id and resume.
I hope this helps to build the rest of the logic on top of it!
NOTE:
It's justified to ask why not to simply put ShortCodes that return the Post ID and Title in a hidden Field in the Form, and just submit it.
The reason is, WordPress dislikes nested ShortCodes or better, apostrophes (and hence HTML or other content) inside ShortCodes, so it's adequate to use Custom PHP in this case.