diff --git a/app/helpers/polaris/form_builder.rb b/app/helpers/polaris/form_builder.rb index af1038d1..b89a8159 100644 --- a/app/helpers/polaris/form_builder.rb +++ b/app/helpers/polaris/form_builder.rb @@ -103,6 +103,7 @@ def polaris_collection_check_boxes(method, collection, value_method, text_method if value.present? options[:selected] = value.map { |el| el.public_send(value_method) } end + input_options = options.delete(:input_options) || {} render Polaris::ChoiceListComponent.new( form: self, @@ -113,7 +114,11 @@ def polaris_collection_check_boxes(method, collection, value_method, text_method &block ) do |choice| collection.each do |item| - choice.with_checkbox(label: item.public_send(text_method), value: item.public_send(value_method)) + choice.with_checkbox( + label: item.public_send(text_method), + value: item.public_send(value_method), + input_options: input_options + ) end end end