%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::candidate_box_select ::xowiki::formfield::candidate_box_select add_bulk_handler add_drag_handler render_input ::xowiki::formfield::candidate_box_select->::xowiki::formfield::select ::xowiki::formfield::month ::xowiki::formfield::month initialize ::xowiki::formfield::month->::xowiki::formfield::select ::xowiki::formfield::HH24 ::xowiki::formfield::HH24 initialize ::xowiki::formfield::HH24->::xowiki::formfield::select ::xowiki::formfield::class ::xowiki::formfield::class initialize ::xowiki::formfield::class->::xowiki::formfield::select ::xowiki::formfield::iprange ::xowiki::formfield::iprange initialize ::xowiki::formfield::iprange->::xowiki::formfield::select ::xowiki::formfield::security_policy ::xowiki::formfield::security_policy initialize ::xowiki::formfield::security_policy->::xowiki::formfield::select ::xowiki::formfield::MM ::xowiki::formfield::MM initialize ::xowiki::formfield::MM->::xowiki::formfield::select ::xowiki::formfield::MI ::xowiki::formfield::MI initialize value ::xowiki::formfield::MI->::xowiki::formfield::select ::xowiki::formfield::grading_scheme ::xowiki::formfield::grading_scheme initialize ::xowiki::formfield::grading_scheme->::xowiki::formfield::select ::xowiki::formfield::DD ::xowiki::formfield::DD initialize ::xowiki::formfield::DD->::xowiki::formfield::select ::xowiki::formfield::mon ::xowiki::formfield::mon initialize ::xowiki::formfield::mon->::xowiki::formfield::select ::xowiki::formfield::bootstrap-select ::xowiki::formfield::bootstrap-select initialize render_input ::xowiki::formfield::bootstrap-select->::xowiki::formfield::select ::xowiki::formfield::reorder_box ::xowiki::formfield::reorder_box answer_is_correct initialize render_input ::xowiki::formfield::reorder_box->::xowiki::formfield::select ::xowiki::formfield::role_member ::xowiki::formfield::role_member check=options get_entry_label initialize pretty_value render_input ::xowiki::formfield::role_member->::xowiki::formfield::candidate_box_select ::xowiki::formfield::abstract_page ::xowiki::formfield::abstract_page check=options fetch_entry_label get_entry_label initialize pretty_value render_input ::xowiki::formfield::abstract_page->::xowiki::formfield::candidate_box_select

Class ::xowiki::formfield::select

::xowiki::formfield::select[i] create ... \
           [ -CSSclass (default "form-select") ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::enumeration[i]
  • subclass: ::xowiki::formfield::candidate_box_select[i], ::xowiki::formfield::month[i], ::xowiki::formfield::HH24[i], ::xowiki::formfield::class[i], ::xowiki::formfield::iprange[i], ::xowiki::formfield::security_policy[i], ::xowiki::formfield::MM[i], ::xowiki::formfield::MI[i], ::xowiki::formfield::grading_scheme[i], ::xowiki::formfield::DD[i], ::xowiki::formfield::mon[i], ::xowiki::formfield::bootstrap-select[i], ::xowiki::formfield::reorder_box[i]
::xotcl::Class create ::xowiki::formfield::select \
     -superclass ::xowiki::formfield::enumeration

Methods (to be applied on instances)

  • CSSclass (setter)

  • initialize (scripted)

    set :widget_type text(select)
    next
    if {![info exists :options]} {set :options [list]}
  • multiple (setter)

  • render_input (scripted)

    set value [:value]
    set atts [:get_attributes id name {CSSclass class}]
    set disabled_p [:is_disabled]
    if {$disabled_p} {lappend atts disabled true}
    if {${:multiple}} {lappend atts multiple ${:multiple}}
    if {!${:required}} {
      set :options [linsert ${:options} 0 [list "--" ""]]
    }
    ::html::select $atts {
      foreach o ${:options} {
        lassign $o label rep
        set atts {}
        if {$disabled_p} {
          lappend atts disabled true
        }
        lappend atts value $rep
        #:msg "lsearch {$value} $rep ==> [lsearch $value $rep]"
        if {[string is list -strict $value] && $rep in $value} {
          lappend atts selected selected
        }
        ::html::option $atts {::html::t $label}
        ::html::t \n
      }
    }
    :handle_transmit_always $value