%3 ::xowiki::formfield::radio ::xowiki::formfield::radio initialize render_input ::xowiki::formfield::enumeration ::xowiki::formfield::enumeration add_statistics answer_is_correct config_from_category_tree get_labels ggw initialize make_correct pretty_value render_input render_label_classes render_label_text render_result_statistics scores stats_record_detail value_if_nothing_is_returned_from_form ::xowiki::formfield::radio->::xowiki::formfield::enumeration ::xowiki::formfield::checkbox ::xowiki::formfield::checkbox initialize render_input td_pretty_value ::xowiki::formfield::checkbox->::xowiki::formfield::enumeration ::xowiki::formfield::select ::xowiki::formfield::select initialize render_input ::xowiki::formfield::select->::xowiki::formfield::enumeration ::xowiki::formfield::ShuffleField ::xowiki::formfield::ShuffleField ::xowiki::formfield::enumeration->::xowiki::formfield::ShuffleField ::xowiki::formfield::boolean_checkbox ::xowiki::formfield::boolean_checkbox check=options initialize value_if_nothing_is_returned_from_form ::xowiki::formfield::boolean_checkbox->::xowiki::formfield::checkbox

Class ::xowiki::formfield::checkbox

::xowiki::formfield::checkbox[i] create ... \
           [ -horizontal:boolean (default "false") ] \
           [ -richtext:boolean (default "false") ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::enumeration[i]
  • subclass: ::xowiki::formfield::boolean_checkbox[i]
::xotcl::Class create ::xowiki::formfield::checkbox \
     -superclass ::xowiki::formfield::enumeration

Methods (to be applied on instances)

  • horizontal (setter)

  • initialize (scripted)

    set :multiple true
    set :widget_type text(checkbox)
    next
  • render_input (scripted)

    set value [:value]
    
    set disabled_p [:is_disabled]
    lappend base_atts  type checkbox  name ${:name}
    
    foreach o ${:options} label_class [:render_label_classes] description ${:descriptions} {
      lassign $o label rep
      set id ${:id}:$rep
      set atts [list {*}$base_atts id $id value $rep]
      if {$disabled_p} {
        lappend atts disabled true
      }
      #ns_log notice ATTS=$atts
      if {[string is list -strict $value] && $rep in $value} {
        lappend atts checked checked
      }
      if {1 || ${:horizontal}} {lappend label_class [::xowiki::CSS class checkbox-inline]}
      ::html::label -for $id -class $label_class {
        ::html::input $atts {}
        :render_label_text $label $label_class $description
      }
      :render_result_statistics $rep
    
      if {!${:horizontal}} {
        html::br
      }
    }
    :handle_transmit_always $value
  • richtext (setter)

  • td_pretty_value (scripted)

    return $v