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.
mail@pastecode.io avatar
unknown
javascript
7 months ago
787 B
1
Indexable
Never
<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>
Leave a Comment