diff --git a/www/examples/value-select.md b/www/examples/value-select.md index f252b2d0..e2f731d7 100644 --- a/www/examples/value-select.md +++ b/www/examples/value-select.md @@ -4,6 +4,40 @@ layout: demo_layout.njk ## Dependent Select +In this example we show how to make the values in one `select` depend on the value selected in another `select`. + +To begin we start with a default value for the `make` select: Audi. We render the `model` select for this make. We +then have the `make` select trigger a `GET` to `/models` to retrieve the models options and target the `models` select. + +Here is the code: + +```html +
+ + +
+
+ + +
+``` + +When a request is made to the `/models` end point, we return the models for that make: + +```html + + + +``` + +And they become available in the `model` select. {% include demo_ui.html.liquid %}