DataTable nests `<form>` inside `<form>`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Ruby
- Estrellas
- 1k
- Forks
- 67
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 14
Descripción
- Where:
DataTableFormwraps the table;DataTableSearchand
DataTablePerPageSelecteach render their own<form>inside it.
Snapshotdata_table/full_frameholds three<formelements. - Effect: nested forms are invalid HTML. A browser ignores the inner
<form>start tags when a form is in scope, so the search input and the
per-page select become children of the outer bulk form, and
this.form.requestSubmit()indata_table_search_controller.jssubmits
the wrong form. - Fix: render the search and per-page forms outside the bulk form, or
make their controls reference it with theform=attribute; re-record (on the 2.0 line)
data_table/*. - 2.0 note: Herb's
NestingValidatorwill likely reject this at compile
time, which makes it a template adjustment in the DataTable migration.
Fixing it on 1.6 first keeps the migration a pure port.
Surfaced by the golden HTML suite (PR #536), which pins what 1.6 renders today — this defect included. Per maintainer decision (2026-09-19) main stays as is: this is addressed on the 2.0 line, and the golden snapshot that pins it is re-recorded there with the diff reviewed.
Source: design/v2/follow-up-issues.md.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con DataTableForm, DataTableSearch, DataTablePerPageSelect y data_table_search_controller.js; después inspecciona el snapshot data_table/full_frame y los demás snapshots de data_table. Confirma la estructura del formulario renderizado y cómo requestSubmit() selecciona su destino. Se considera terminado cuando las plantillas 2.0 evitan los formularios anidados y los snapshots de data_table/* se vuelven a grabar y se revisan con la salida corregida.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, ruby
- Área
- frontend, testing
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 68/100