Sorry, has taken me a little while to get back to you. Here's my update: I have gotten rid of the modals- that's not a problem. The forms now exist on the content template pages (see screenshot).
However, the post relationships still don't work properly.
Here is the problematic block of code:
add_action('cred_save_data','func_custom_post_title',15,2);
function func_custom_post_title($post_id,$form_data) {
if ($form_data['id']==243) {
toolset_connect_posts('boat-safety-check',$_POST['@boat-safety-check.parent'], $post_id);
}
if ($form_data['id']==302) {
toolset_connect_posts('safety-check-log-item',$_POST['@safety-check-log-item.parent'], $post_id);
}
}
With that code commented out: the post form submits & redirects, but the relationship isn't saved.
With that code active: the post form doesn't submit correctly, returning The parent must be a post ID or a WP_Post instance error.
I then swapped the site over to 2017 to test the form without any of my custom code: post form submits & redirects, but relationship still isn't saved.
I've then disabled all plugins apart from the toolset ones, and it still doesn't save the relationship. I'll leave it in that state so you can take a look and work out what the issue is?
I found that the problem seems to be the other CRED form you have in the same Content Template (the safety check edit form). If I remove that then the log item form works correctly.
I'm trying to see if I can reproduce on a vanilla test site, or whether it is particular to your site.
It is fixed in an update to Toolset Forms 2.1, which is currently in QA testing. That will take a few days and so barring any hiccups will be released mid next week.
Sorry for the delay, it is August when things tend to slow down a little because of holidays.