Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a select box example #303

Merged
merged 1 commit into from
Sep 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/views/guide_form_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ <h3 class="heading-medium" id="form-select-boxes">Select boxes</h3>
Avoid using select boxes (drop-down lists) - use radio buttons or checkboxes instead.
</p>

<div class="example">
{% include "snippets/form_select_boxes.html" %}
</div>

<pre>
<code class="language-markup">
{% include "snippets/encoded/form_select_boxes.html" %}
</code>
</pre>

<p>
<a href="https://designpatterns.hackpad.com/Select-boxes-KzQ1IRd07HL" rel="external">
Discuss select boxes on the design patterns Hackpad
Expand Down
8 changes: 8 additions & 0 deletions app/views/snippets/form_select_boxes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="form-group">
<label class="form-label" for="select-box">This is the label text</label>
<select class="form-control" id="select-box">
<option>GOV.UK elements option 1</option>
<option>GOV.UK elements option 2</option>
<option>GOV.UK elements option 3</option>
</select>
</div>