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
<form action="/products" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="fMMOPwMj9s73yEQLheC0x5b_j8yh9pjJslLR3awWu7L08alQtIoQCxJAQx3KNajkBoYyxaPXNXPLz8b_vRrAig" autocomplete="off" /> <div> <label class="Polaris-Choice"> <span class="Polaris-Choice__Control"> <span class="Polaris-Checkbox"> <input name="product[accept]" type="hidden" value="0" autocomplete="off" /><input aria-checked="false" class="Polaris-Checkbox__Input" type="checkbox" value="1" name="product[accept]" id="product_accept" /> <span class="Polaris-Checkbox__Backdrop"></span> <span class="Polaris-Checkbox__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M14.03 7.22a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 1 1 1.06-1.06l1.72 1.72 3.97-3.97a.75.75 0 0 1 1.06 0Z"></path></svg> </span> </span> </span> </span> <span class="Polaris-Choice__Label"> Basic checkbox </span> </label> <div class="Polaris-Choice__Descriptions"> <div class="Polaris-Choice__HelpText"> <span class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--subdued Polaris-Text--regular"> Customers must review their order details before purchasing. </span> </div> </div> </div> <div> <label class="Polaris-Choice"> <span class="Polaris-Choice__Control"> <span class="Polaris-Checkbox"> <input name="product[accept]" type="hidden" value="0" autocomplete="off" /><input aria-checked="true" class="Polaris-Checkbox__Input" type="checkbox" value="1" checked="checked" name="product[accept]" id="product_accept" /> <span class="Polaris-Checkbox__Backdrop"></span> <span class="Polaris-Checkbox__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M14.03 7.22a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 1 1 1.06-1.06l1.72 1.72 3.97-3.97a.75.75 0 0 1 1.06 0Z"></path></svg> </span> </span> </span> </span> <span class="Polaris-Choice__Label"> Checked checkbox </span> </label> <div class="Polaris-Choice__Descriptions"> <div class="Polaris-Choice__HelpText"> <span class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--subdued Polaris-Text--regular"> Checkbox with overriden "checked" option. </span> </div> </div> </div></form>
1
2
3
4
5
6
7
8
9
10
11
<%= form_with(model: product, builder: Polaris::FormBuilder) do |form| %> <%= form.polaris_check_box(:accept, label: "Basic checkbox", help_text: "Customers must review their order details before purchasing.", ) %> <%= form.polaris_check_box(:accept, label: "Checked checkbox", help_text: 'Checkbox with overriden "checked" option.', checked: true ) %><% end %>
No notes provided.
No params configured.