Выбор по умолчанию чекбокса в попапе Elementor
jQuery(function ($) {
$(document).on('elementor/popup/show', function () {
// Установка чекбоксов
const checkbox1 = document.getElementById('form-field-field_4a2cd098-0');
if (checkbox1) checkbox1.checked = true;
const checkbox2 = document.getElementById('form-field-field_88be0299-0');
if (checkbox2) checkbox2.checked = true;
});
});
Выбор по умолчанию радио кнопки в попапе Elementor
jQuery(function ($) {
$(document).on('elementor/popup/show', function () {
const radio = document.getElementById('form-field-field_mail_tel-0');
if (radio) {
radio.checked = true;
radio.dispatchEvent(new Event('change'));
}
});
});
Спасибо в одном попапе с формой
css class заголовка: .form-title
css class блока с формой: .popup-forms
css class блока спасибо: .thank-you
id формы: #popup_forms
jQuery(function ($) {
$('#popup_forms').on('submit_success', function (event, response) {
// скрыть эти блоки
$('.popup-forms, .form-title').css('display', 'none');
// показать блок спасибо
$('.thank-you').css('display', 'block');
});
});
Готово.