x
1
2
3
4
5
<form action="#" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="1Nj1vjv3nXNXpRnYKEks1QfbyuFBkLLCwXE_7IGubHHoeH_GQsYEILxnoa2uV00hd3s1F_mZ73x4IBvyyhNAJg" autocomplete="off" />
<div class="rpf-input-field"><label for="sort" class="rpf-label">Sort by<small class="rpf-label__hint">Please select which berry to sort by</small></label><select id="sort" name="sort" class="rpf-input rpf-input-select"><option value="">Please select</option><option value="blueberry">Blueberry</option>
<option value="gooseberry">Gooseberry</option>
<option selected="selected" value="raspberry">Raspberry</option></select></div>
</form>
1
2
3
4
5
6
7
8
<%= form_with url: '#', builder: DesignSystem::FormBuilder do |f| %>
<%= f.rpf_select_input :sort,
options: options_for_select(%w[blueberry gooseberry raspberry].map{|v| [v.titleize, v]}, selected: selected),
include_blank: "Please select",
label: 'Sort by',
hint: 'Please select which berry to sort by',
modifiers:, error:, **attrs %>
<% end %>
Param Description Input

The error message to display