I recently worked on a Wordpress site that utilized the popular ContactForm7 (https://contactform7.com/) plug-in that only sends an email and does not save data. The client wanted the data saved to a custom CRM database. This is my solution.
This article demonstrates a very simple pattern for creating a WordPress plugin that displays and processes a form.
The form is activated by a shortcode and includes server side validation of the data .