From f0efb9253c439dea0d7bda7af288df6ff898b245 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 14 Feb 2023 16:38:10 -0500 Subject: [PATCH] remove inline validation examples --- docs/getting-started/form-controls.md | 389 -------------------------- 1 file changed, 389 deletions(-) diff --git a/docs/getting-started/form-controls.md b/docs/getting-started/form-controls.md index bf206c6b..c06ac351 100644 --- a/docs/getting-started/form-controls.md +++ b/docs/getting-started/form-controls.md @@ -375,395 +375,6 @@ This example demonstrates custom validation styles using `data-user-invalid` and ``` -## Inline Form Validation - -You can switch from normal validation mode, where validation messages are presented by browser specific tooltips, to an inline validation mode where the validation messages are displayed below the form fields, normally in red color. -This can be achieved completely in userland with customizations using CSS and JavaScript. -Here's the same example as the previous one, but this time we use inline form validation. - -```html preview - -
- - - - Birds - Cats - Dogs - Other - - - Accept terms and conditions - - Submit - Reset -
-
- - - - -``` - -## Inline Form Validation (old version - to be deleted after testing) // TODO!!!! - -```html preview - -
- - Mrs. - Mr. - Other - - - - - - - USA - Canada - - - - - Please approve that this is really your favorite color - - - - Accept terms and conditions - - Submit - Reset -
-
- - - - -``` - ## Getting Associated Form Controls At this time, using [`HTMLFormElement.elements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/elements) will not return Shoelace form controls because the browser is unaware of their status as custom element form controls. Fortunately, Shoelace provides an `elements()` function that does something very similar. However, instead of returning an [`HTMLFormControlsCollection`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection), it returns an array of HTML and Shoelace form controls in the order they appear in the DOM.