multi step form without click the next button
-
Hello ? am trying to add a multi step form and if a user click on any radio or checkbox, it can be directly redirected to the next step without clicking on next button.
I found the following Code in another thread and it was basically working for a while (like 10 minutes), but now its not anymore.
This Problem occures on 2 other pages of mine.
Thought the problem is any of the used plugins, but seems like its not, as I tried it with only using forminator as plugin on my page on this sub-domain.(usually I am working with elementor pro – its also installed again)
this is my code :
(function($) {
$(document).ready(function() {
setTimeout(function() {
$(‘.forminator-custom-form’).trigger(‘after.load.forminator’);
}, 100);$(document).on(‘after.load.forminator’, function(e, form_id) {
var next_button = document.querySelector(‘.forminator-button-next’),
click_event = new CustomEvent(‘change_evt’),
clickable_elements = document.querySelectorAll(‘.next-on-click .forminator-checkbox-label’),
checkboxes = document.querySelectorAll(‘.next-on-click input[type=”checkbox”]’);clickable_elements.forEach(
clickable_element => {
clickable_element.addEventListener(‘click’, wpmudev_clickables_event_callback)
}
)function wpmudev_clickables_event_callback() {
if (typeof(next_button) != ‘undefined’ && next_button != null) {checkboxes.forEach(checkbox => {
checkbox.addEventListener(‘change’, wpmudev_change_evt_callback)
})
}
}function wpmudev_change_evt_callback(e) {
if (e.currentTarget.checked) {
next_button.click();
}
}});
});
})(jQuery);
can someone tell me what is wrong with my site / the code?
Thank you!
The page I need help with: [log in to see the link]
- The topic ‘multi step form without click the next button’ is closed to new replies.