Hello and thank you for contacting the Toolset support.
Toolset requires a title for a related post that is created from the backend. The title is used to generate the slug of the new post and is also used in the table of the related posts. Check this screenshot hidden link
I am not sure what is the real reason behind, so I'll need to check this with our 2nd Tier or our developers.
In the meantime, I run a test on a clean install and I came up with a hacky workaround. It consists of a custom Javascript code that does two things:
- Modify the AJAX request that will create the post to make sure it has a (default)title.
- Hide the title input in the "Add new Inquiry" modal window.
I added the custom code to a Javascript in the theme. Then I enqueued it using a PHP snippet. I used the Snippets plugin for that reason. You can check my example on this test site hidden link
Please note that the test site will be available for 7 days.
You can try to add an Inquiry to this customer hidden link
Check this screencast hidden link
Please note that you will have to hit "Enter" as it won't be enabled because the title is empty.
The Javascript code is as follow, and I put it inside a "my_customer_admin_script.js" file inside the theme folder:
jQuery(function($){
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
if ( originalOptions.data['wpcf[post][post-title]'] == "")
options.data = $.param( $.extend(originalOptions.data, { 'wpcf[post][post-title]' : "Some Default Title"}) );
});
$('body').append('<style>input[name="wpcf[post][post-title]"] { display:none; } label[for="types-new-post-type-title"] { display:none; }</style>');
});
The PHP code to enqueue the file for only the custom edit screen, you can edit it here hidden link:
function wpc_add_admin_cpt_script( $hook ) {
global $post;
if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
if ( 'customer' === $post->post_type ) {
wp_enqueue_script( 'myscript', get_stylesheet_directory_uri().'/my_customer_admin_script.js' );
// wp_add_inline_script('shapeSpace_script', 'console.log("Bingo")', 'before');
}
}
}
add_action( 'admin_enqueue_scripts', 'wpc_add_admin_cpt_script', 10, 1 );