Go to your page or section where your form:
- Add an acceptance checkbox with required set to false and set the id to something custom
- Add a hidden field with id newsletter_optin_field and set the value to the custom id of the opt-in acceptance checkbox
Copy this function.php code and paste your function file.
Go to your elementor form module Actions after submit field and add mailchimp with your Api and add your setting as your demand.
In form you will see a checkbox. if you check this checkbox then your form data transfer your mailchimp list other wise not.