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
<form action="/products" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="YHDvC72YXIyE9e90GNqRPpOPu5tNMWFrOZTGzaxTttsKlrDkTYsN40p4RcObbqH7g1poRC3THkJK0ho1-kNiUw" autocomplete="off" /> <div class="polaris-text-field-wrapper"> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text" for="product_title">Title</label> </div> </div> <div class="Polaris-Connected"> <div class="Polaris-Connected__Item Polaris-Connected__Item--primary"> <div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField"> <input data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" type="text" value="Product Name" name="product[title]" id="product_title" /> <div class="Polaris-TextField__Backdrop"></div> </div> </div> </div> <div class="Polaris-Labelled__HelpText"> <span class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--subdued Polaris-Text--regular Polaris-Text--break"> Note about text field </span> </div> </div></form><div class="Polaris-Spacer Polaris-Spacer--verticalSpacingBase"></div><form action="/products" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="jMHLpfEXMQBbpz5y4635Byfm2fH-p2UgD6dqC0DgZRfmJ5RKAQRgb5UqlMVgGcnCNzMKLp5FGgl84bbzFvCxnw" autocomplete="off" /> <div class="polaris-text-field-wrapper"> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text" for="product_title">Title</label> </div> </div> <div class="Polaris-Connected"> <div class="Polaris-Connected__Item"> <div class="Polaris-Labelled--hidden"> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text" for="weight_unit">Weight unit</label> </div> </div> <div data-controller="polaris-select" data-selected-value="kg" class="Polaris-Select"> <select name="weight_unit" id="weight_unit" class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update"><option selected="selected" value="kg">kd</option> <option value="lb">lb</option></select> <div class="Polaris-Select__Content" aria-hidden="true" > <span class="Polaris-Select__SelectedOption" data-polaris-select-target="selectedOption" > kd </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-Connected__Item Polaris-Connected__Item--primary"> <div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField"> <input data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" type="text" value="Product Name" name="product[title]" id="product_title" /> <div class="Polaris-TextField__Backdrop"></div> </div> </div> <div class="Polaris-Connected__Item"> <button type="button" data-controller="polaris-button" class="Polaris-Button"> <span class="Polaris-Button__Content"> <div class="Polaris-Button__Text"> Submit </div> </span> </button> </div> </div> <div class="Polaris-Labelled__HelpText"> <span class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--subdued Polaris-Text--regular Polaris-Text--break"> Note about text field </span> </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
<%= form_with(model: product, builder: Polaris::FormBuilder) do |form| %> <%= form.polaris_text_field(:title, help_text: "Note about text field") %><% end %><%= polaris_spacer(vertical: :base) %><%= form_with(model: product, builder: Polaris::FormBuilder) do |form| %> <%= form.polaris_text_field(:title, help_text: "Note about text field") do |c| %> <% c.with_connected_left do %> <%= polaris_select( name: :weight_unit, label: "Weight unit", label_hidden: true, options: { "kd" => "kg", "lb" => "lb" }, selected: "kg", ) %> <% end %> <% c.with_connected_right do %> <%= polaris_button { "Submit" } %> <% end %> <% end %><% end %>
No notes provided.
No params configured.