diff --git a/lab_formularios.php b/lab_formularios.php index 1f9ac75..a96c004 100644 --- a/lab_formularios.php +++ b/lab_formularios.php @@ -85,6 +85,13 @@ require_once __DIR__ . '/shared/components/sidebar.php';
+
+
+ + +
+
Cargando… @@ -393,6 +400,20 @@ async function cargarFormularios() { renderFormularios(); } +function filtrarFormularios(q) { + q = q.trim().toLowerCase(); + const grid = $('formularios-grid'); + if (!q) { renderFormularios(); return; } + const filtrados = _formularios.filter(f => + (f.nombre || '').toLowerCase().includes(q) || + (f.tipo || '').toLowerCase().includes(q) + ); + const orig = _formularios; + _formularios = filtrados; + renderFormularios(); + _formularios = orig; +} + function renderFormularios() { const grid = $('formularios-grid'); if (!_formularios.length) {