button integration

I want to integrate my fluent form submit button with the simply schedule booking button. Like until users book the button in simply schedule appointment booking form fluent form submit button will be hidden. After the user books the button the mutitstep fluent form submit button will show up.
 avatar
unknown
javascript
2 years ago
787 B
5
Indexable
<script>
<!-- Add your snippet here. -->
document.addEventListener('DOMContentLoaded', function() {
    var scheduleBookingButton = document.querySelector('.mdc-button__ripple'); // Select the SSA booking form button
    var fluentFormSubmitButton = document.querySelector('.fluent_form_4 button.ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style'); // Select the Fluent Form's submit button
    
    if (scheduleBookingButton && fluentFormSubmitButton) {
        fluentFormSubmitButton.style.display = 'none'; // Hide the Fluent Form's submit button initially
    
        scheduleBookingButton.addEventListener('click', function() {
            fluentFormSubmitButton.style.display = 'block'; // Show the Fluent Form's submit button on SSA booking button click
        });
    }
});
</script>
Editor is loading...
Leave a Comment