This code goes into the additional settings box of contact form 7 (cf7) to close the current form modal and open a new success modal.
<!--closes current modal, set id to whatever your modal id is.-->
on_sent_ok: "jQuery('#order-form').modal('toggle');"
<!--opens new modal, set id to whatever your modal id is.-->
on_sent_ok: "jQuery('#success').modal();"