Kiss A simpler, smarter web application framework for Ruby

Kiss::Form::CheckboxField Subclass of Kiss::Form::MultiValueField

Public Instance Methods

element_html() source

Not documented

    # File lib/kiss/form/field.rb, line 370
      def element_html
        hidden_options = @hidden_join ? input_tag_html(
          :type => 'hidden',
          :name => "#{@name}_options",
          :value => option_pairs.map {|v,d| value_to_s(v) }.join(@hidden_join)
        ) : ''
        
        column_layout(elements_html) + other_field_html + hidden_options
      end
    
elements_html() source

Not documented

    # File lib/kiss/form/field.rb, line 380
      def elements_html
        name = @name.to_s+'[]'
        option_pairs.map do |value,display|
          input_tag_html(
            { :name => name, :value => value_to_s(value) },
            selected_option_values[value.to_s] ? 'checked' : ''
          ) + @currency.to_s + display_to_s(display)
        end
      end
    

Disabled; run with $DEBUG to generate this.