Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-forms-1.0.js

Код файла
Версия от 15.10.2026, 07:00:47 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
4401function t_forms__showWrongPageUrlMessage(canonicalUrl) {4402	if (!canonicalUrl) {4403		return;4404	}4405 4406	const popupId = 'tildaforms-origin-url-popup-notification';4407 4408	const existingPopup = document.getElementById(popupId);4409 4410	if (existingPopup) {4411		show(existingPopup);4412		return;
История файла и сравнение версий
  • 15.10.2026, 07:00:47 · 56c3b845
4413
}
4414
4415 const html = `
4416 <div id="${popupId}" class="t-form-success-popup t-form-success-popup_new" role="dialog" aria-modal="true" tabindex="-1" aria-label="Wrong Page URL">
4417 <div class="t-form-success-popup__wrapper">
4418
4419 <button type="button" class="t-form-success-popup__close-icon" aria-label="Закрыть диалоговое окно">
4420 <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
4421 <path fill="#000" fill-rule="evenodd" d="M7 5.863 1.138 0 0 1.138 5.862 7 0 12.862 1.137 14 7 8.137 12.863 14 14 12.862 8.138 7 14 1.138 12.863 0 7.001 5.863Z" clip-rule="evenodd" opacity=".4"></path>
4422 </svg>
4423 </button>
4424
4425 <svg class="t-form-success-popup__content-icon" xmlns="http://www.w3.org/2000/svg" width="41" height="41" viewBox="0 0 21 21" fill="none" data-app="Xyris">
4426 <circle cx="10.5" cy="10.5" r="10.5" fill="#F87A61"/>
4427 <path d="M10.0781 13.1562L9.64844 7.08594V4.54688H11.3906V7.08594L10.9844 13.1562H10.0781ZM9.71094 16V14.3984H11.3281V16H9.71094Z" fill="white"/>
4428 </svg>
4429
4430 <div class="t-form-success-popup__title t-title">${t_forms__getMsg('cached_page_popup_title')}</div>
4431
4432 <div class="t-form-success-popup__text t-text">${t_forms__getMsg('cached_page_popup_text')}</div>
4433
4434 <a href="${canonicalUrl}" class="t-form-success-popup__button t-btn">${t_forms__getMsg('cached_page_popup_btn')}</a>
4435 </div>
4436 </div>
4437 `;
4438
4439 document.body.insertAdjacentHTML('beforeend', html);
4440
4441 const popup = document.getElementById(popupId);
4442 const closeButton = popup.querySelector('.t-form-success-popup__close-icon');
4443
4444 t_addEventListener(popup, 'click', function (event) {
4445 const clickEvent = event || window.event;
4446 const target = clickEvent.target || clickEvent.srcElement;
4447
4448 if (target === this) {
4449 hide(popup);
4450 }
4451 });
4452
4453 t_addEventListener(closeButton, 'click', function () {
4454 hide(popup);
4455 });
4456
4457 show(popup);
4458
4459 function show(popup) {
4460 t_fadeIn(popup);
4461 t_addClass(document.body, 't-body_success-popup-showed');
4462
4463 if (t_forms__isIOS()) {
4464 setTimeout(function () {
4465 window.tildaForm.lockBodyScroll();
4466 }, 500);
4467 }
4468
4469 t_forms__trapFocus(popup);
4470 }
4471
4472 function hide(popup) {
4473 t_removeClass(document.body, 't-body_success-popup-showed');
4474
4475 if (t_forms__isIOS()) {
4476 window.tildaForm.unlockBodyScroll();
4477 }
4478
4479 t_fadeOut(popup);
4480 }
4481}
4482
4483/**
4484 * Обработчик урла и его query-параметров, который проставляет
4485 * значения на существующие поля форм на странице.
4486 * @param {event | {}} event
4487 */
4488function t_forms__processGetParameters(event = {}) {
4489 if (!window.URLSearchParams || t_forms__getTildaMode() !== 'published') return;
4490 const params = new URLSearchParams(window.location.search);
4491 if (!params?.size) return;
4492 const { currentTarget } = event;
4493
4494 let inputSelectors = [
4495 '.t-select',
4496 '.t-input',
4497 '.t-rate',
4498 '.t-radio',
4499 '.t-checkbox',
4500 '.t-img-select',
Предыдущие 100 строкСледующие 100 строк