Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<form action="/products" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="8kpvW3MrV899x7FahjpdZhUsmUO17BDX5nipuKBSMB-BZ50Rlqdzs7o5U3paHQSzvypyIyUNmvJs5rR4ZD8Kvg" autocomplete="off" />
<div class="Polaris-FormLayout">
<div class="Polaris-FormLayout__Item">
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="product_status">Status</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="" class="Polaris-Select">
<select class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update" name="product[status]" id="product_status"><option value="active">Active</option>
<option value="draft">Draft</option></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="product_status">Status</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="draft" class="Polaris-Select">
<select class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update" name="product[status]" id="product_status"><option value="active">Active</option>
<option selected="selected" value="draft">Draft</option></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
Draft
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="product_status">Status</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="" class="Polaris-Select">
<select class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update" name="product[status]" id="product_status"><option value="">Choose status</option>
<option value="active">Active</option>
<option value="draft">Draft</option></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="product_status">Status</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="" class="Polaris-Select">
<select class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update" name="product[status]" id="product_status"><option value="" label=" "></option>
<option value="active">Active</option>
<option value="draft">Draft</option></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="product_country">Country</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="" class="Polaris-Select">
<select class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update" name="product[country]" id="product_country"><optgroup label="North America"><option value="US">United States</option>
<option value="Canada">Canada</option></optgroup><optgroup label="Europe"><option value="Denmark">Denmark</option>
<option value="Germany">Germany</option>
<option value="France">France</option></optgroup></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
{"North America"=>[["United States", "US"], "Canada"], "Europe"=>["Denmark", "Germany", "France"]}
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
</div>
</div>
</form>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<%= form_with(model: product, builder: Polaris::FormBuilder) do |form| %>
<%= polaris_form_layout do |form_layout| %>
<% form_layout.with_item do %>
<%= form.polaris_select(:status,
options: { "Active" => "active", "Draft" => "draft" },
) %>
<% end %>
<% form_layout.with_item do %>
<%= form.polaris_select(:status,
options: { "Active" => "active", "Draft" => "draft" },
selected: "draft",
) %>
<% end %>
<% form_layout.with_item do %>
<%= form.polaris_select(:status,
options: { "Active" => "active", "Draft" => "draft" },
select_options: { prompt: "Choose status" },
) %>
<% end %>
<% form_layout.with_item do %>
<%= form.polaris_select(:status,
options: { "Active" => "active", "Draft" => "draft" },
select_options: { include_blank: true },
) %>
<% end %>
<% form_layout.with_item do %>
<%= form.polaris_select(:country,
options: {
'North America' => [['United States','US'], 'Canada'],
'Europe' => ['Denmark','Germany','France']
},
grouped: true
) %>
<% end %>
<% end %>
<% end %>