From b80858e90a7e2bd87a1a7b2399e177a36b741c4b Mon Sep 17 00:00:00 2001 From: carson Date: Thu, 14 May 2020 15:40:08 -0700 Subject: [PATCH] Clean up parameter inclusion logic and update demos to use GET where appropriate, rather than hiding from my bad design choices document example --- www/examples/value-select.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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 %}