Hey Stephen,
Thank you for reaching out to us. Perhaps you do something like this:
jQuery(document).ready(function($){
$('form').on("submit", function(event) {
$('.tco-close-content-dock').click();
});
});
This will close the content dock on form submission but it won’t check if the form was successfully submitted or not, regretfully there is no easy way to check this case. You probably need to find the success method of your form submission and then inside the success method you can use the following code to close the content dock:
jQuery('.tco-close-content-dock').click();
Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.
Thanks!