Commit Graph

5 Commits

Author SHA1 Message Date
Beverly Nguyen
3a38b8bf31 fixed validation for radio and text input fields 2025-03-21 18:53:49 -07:00
Beverly Nguyen
084a5e37fc Revert "Send Message A11Y Audit - Unique IDs and also refactor error message on templates page" 2025-01-21 22:20:44 -08:00
Beverly Nguyen
1df019e78c adding required html field 2024-12-18 12:40:45 -08:00
Leo Hemsted
17cc262ea3 preserve previous state on form error
the html now contains a `data-prev-state` attribute which contains the
previous state, taken from the `operation` value in the form data (from
the submit button). This is used to seed the `currentState` of the
templateFolderForm. If not specified (or 'unknown', because the user
hit enter last time round), then set it to nothingSelectedButtons.
2018-12-04 16:41:47 +00:00
Chris Hill-Scott
d9da219b7e Use a macro for form tags
This will stop us repeatedly forgetting to add `novalidate` and
`autocomplete='off'` to our forms (which is how most of them are set
up).

It uses sensible defaults, based on how we most-commonly configure
forms:
- most of our forms are `post`ed (but this can be overridden)
- `autocomplete` should only be enabled where it makes sense, otherwise
  it’s more annoying than useful (but this can be overriden)
- we should never be using HTML5 form validation because our own error
  styles and messages are better
2018-09-19 12:43:15 +01:00