N°8772 - WIP dependencies - Does not work yet

This commit is contained in:
Eric Espie
2025-11-04 09:05:29 +01:00
parent 0909ddfb3a
commit 5a1f6ffde9
7 changed files with 60 additions and 24 deletions

14
js/forms/forms.js Normal file
View File

@@ -0,0 +1,14 @@
/*
* @copyright Copyright (C) 2010-2025 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
function triggerTurbo(el) {
let sFormName = el.form.getAttribute("name");
el.form.querySelector(`[name="${sFormName}[_turbo_trigger]"]`).value = el.getAttribute('name');
el.form.setAttribute('novalidate', true);
el.form.requestSubmit();
console.log('Auto submitting form due to change in field ' + el.getAttribute('name'));
}