template::widget::multiselect (public)

 template::widget::multiselect element_reference tag_attributes

Defined in packages/acs-templating/tcl/widget-procs.tcl

Render a select widget which allows any number of values to be selected.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::menu template::widget::menu (public) template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::multiselect template::widget::multiselect template::widget::multiselect->template::widget::menu template::widget::multiselect->template::widget::merge_tag_attributes

Testcases:
No testcase defined.
Source code:

    upvar $element_reference element

    array set attributes  [::template::widget::merge_tag_attributes element $tag_attributes]

    set attributes(multiple) {}

    # Determine the size automatically for a multiselect
    if { ! [info exists attributes(size)] } {

        set size [llength $element(options)]
        if { $size > 8 } {
            set size 8
        }
        set attributes(size) $size
    }

    return [template::widget::menu  $element(name) $element(options) $element(values) attributes $element(mode)]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/widget-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: