- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::select
::xowiki::formfield::select create ... \
[ -CSSclass (default "form-select") ]
Class Relations
- class: ::xotcl::Class
- superclass: ::xowiki::formfield::enumeration
- subclass: ::xowiki::formfield::month, ::xowiki::formfield::HH24, ::xowiki::formfield::iprange, ::xowiki::formfield::candidate_box_select, ::xowiki::formfield::security_policy, ::xowiki::formfield::MM, ::xowiki::formfield::MI, ::xowiki::formfield::DD, ::xowiki::formfield::bootstrap-select, ::xowiki::formfield::grading_scheme, ::xowiki::formfield::reorder_box, ::xowiki::formfield::class, ::xowiki::formfield::mon
::xotcl::Class create ::xowiki::formfield::select \ -superclass ::xowiki::formfield::enumerationMethods (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
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables