app/inputs/multi_value_select_input.rb
def build_field(value, _index)
      html_options = input_html_options.dup

      if @rendered_first_element
        html_options[:id] = nil
        html_options[:required] = nil
      else
        html_options[:id] ||= input_dom_id
      end
      html_options[:class] ||= []
      html_options[:class] += ["#{input_dom_id} form-control multi-text-field"]
      html_options[:'aria-labelledby'] = label_id
      html_options.delete(:multiple)
      @rendered_first_element = true

      selected_option = if value.respond_to?(:id)
                          value.id
                        elsif value.empty?
                          ""
                        else
                          value
                        end

      html_options[:prompt] = "" if selected_option.blank?

      template.select_tag(
        attribute_name,
        template.options_for_select(select_options, selected_option),
        html_options
      )
    end
# Overriding this so that the class is correct and the javascript
# for multivalue will work on this.
Overriding this so that the class is correct and the javascript
for multivalue will work on this.
Overriding this so that the class is correct and the javascript for multivalue will work on this .
def build_field(value, _index)
      html_options = input_html_options.dup
      if @rendered_first_element
        html_options[:id] = nil
        html_options[:required] = nil
      else
        html_options[:id] ||= input_dom_id
      end
      html_options[:class] ||= []
      html_options[:class] += ["#{input_dom_id} form-control multi-text-field"]
      html_options[:'aria-labelledby'] = label_id
      html_options.delete(:multiple)
      @rendered_first_element = true
      selected_option = if value.respond_to?(:id)
                          value.id
                        elsif value.empty?
                          ""
                        else
                          value
                        end
      html_options[:prompt] = "" if selected_option.blank?
      template.select_tag(
        attribute_name,
        template.options_for_select(select_options, selected_option),
        html_options
      )
    end
def build_field ( value , _index ) html_options = input_html_options . dup if @rendered_first_element html_options [ :id ] = nil html_options [ :required ] = nil else html_options [ :id ] ||= input_dom_id end html_options [ :class ] ||= [ ] html_options [ :class ] += [ "#{input_dom_id} form-control multi-text-field" ] html_options [ :' aria-labelledby ' ] = label_id html_options . delete ( :multiple ) @rendered_first_element = true selected_option = if value . respond_to? ( :id ) value . id elsif value . empty? "" else value end html_options [ :prompt ] = "" if selected_option . blank? template . select_tag ( attribute_name , template . options_for_select ( select_options , selected_option ) , html_options ) end
Overriding this so that the class is correct and the javascript
for multivalue will work on this.
Overriding this so that the class is correct and the javascript for multivalue will work on this .
value
_index