Sha256: 952c832f3bd895aa79690728742e118714d52c0df3c23e41ae53e3d23e8bc95b

Contents?: true

Size: 706 Bytes

Versions: 161

Compression:

Stored size: 706 Bytes

Contents

# frozen_string_literal: true

# :nodoc:
class ArrayCheckBoxGroupForm < ApplicationForm
  form do |check_form|
    # Passing a name: here causes the form to emit all the check boxes with the same name.
    # In the case below, the name of each will be "places[]". If a box is checked, the
    # resulting array will contain the corresponding value.
    check_form.check_box_group(name: "places", label: "Cool places") do |check_group|
      check_group.check_box(value: "lopez", label: "Lopez Island")
      check_group.check_box(value: "bellevue", label: "Bellevue", caption: "Beautiful view")
      check_group.check_box(value: "seattle", label: "Seattle", caption: "The emerald city")
    end
  end
end

Version data entries

161 entries across 161 versions & 3 rubygems

Version Path
primer_view_components-0.30.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.39.1 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.39.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.38.0 app/forms/array_check_box_group_form.rb
primer_view_components-0.29.0 app/forms/array_check_box_group_form.rb
primer_view_components-0.28.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.37.1 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.37.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.36.2 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.36.1 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.36.0 app/forms/array_check_box_group_form.rb
primer_view_components-0.27.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.35.2 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.35.1 app/forms/array_check_box_group_form.rb
primer_view_components-0.26.1 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.35.0 app/forms/array_check_box_group_form.rb
primer_view_components-0.26.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.34.0 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.33.2 app/forms/array_check_box_group_form.rb
openproject-primer_view_components-0.33.1 app/forms/array_check_box_group_form.rb