x
1
2
3
4
5
6
7
8
9
<form class="new_person" id="new_person" action="#" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="toJCBOIcgZ0994x2YboxwSZr-YMIDcVHKGEbMtsw6pXAYFAs8LSr5xCHM9VI7-DZ_310CsD5Vh9nq322JuGF5w" autocomplete="off" />
<fieldset class="rpf-fieldset"><legend class="rpf-label">Sort by<small class="rpf-label__hint">Please select which berry to sort by</small></legend>
<div class="rpf-fieldset__inputs">
<label class="rpf-input-checkbox"><input id="person_berry" name="person[berry]" type="checkbox" value="blueberry">Blueberry 🫐</label>
<label class="rpf-input-checkbox"><input id="person_berry" name="person[berry]" type="checkbox" value="gooseberry">Gooseberry 🥝</label>
<label class="rpf-input-checkbox"><input id="person_berry" name="person[berry]" type="checkbox" value="raspberry">Raspberry 🍓</label>
</div>
</fieldset>
</form>
1
2
3
4
5
6
7
8
<%= form_for model, url: '#', builder: DesignSystem::FormBuilder do |f| %>
<%= f.rpf_fieldset :berry, error:, modifiers:, **attrs do %>
<%# Iterate through the options and create a checkbox for each %>
<% I18n.t('helpers.options.person.berry').each do |key, value| %>
<%= f.rpf_checkbox_input :berry, label: value, checked_value: key, include_hidden: false, error: nil %>
<% end %>
<% end %>
<% end %>
Param Description Input