template::form::section (public)
template::form::section [ -fieldset fieldset ] \ [ -legendtext legendtext ] [ -legend legend ] id section
Defined in packages/acs-templating/tcl/form-procs.tcl
Set the current section (fieldset) of the form. A form may be divided into any number of fieldsets to group related elements. Elements are tagged with the current fieldset properties as they are added to the form. A form style template may insert a divider in the form whenever the fieldset identifier changes.
- Switches:
- -fieldset (optional)
- A list of name-value attribute pairs for the FIELDSET tag
- -legendtext (optional)
- The legend text
- -legend (optional)
- A list of name-value attribute pairs for the LEGEND tag
- Parameters:
- id (required)
- The form identifier.
- section (required)
- The current fieldset identifier
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: get_reference # legend can't be empty if { $section ne "" && $legendtext eq "" } { ad_log Warning "template::form::section (form: $id, section: $section): The legend-text of this section is empty. You must provide text for the legend-text otherwise the section fieldset won't be created." return } set properties(section) $section set properties(sec_legendtext) $legendtext # fieldset attributes set properties(sec_fieldset) "" array set fs_attributes $fieldset foreach name [array names fs_attributes] { if {$fs_attributes($name) eq ""} { append properties(sec_fieldset) " $name" } else { append properties(sec_fieldset) " $name=\"$fs_attributes($name)\"" } } # legend attributes set properties(sec_legend) "" if { $legendtext ne "" } { array set lg_attributes $legend if {![info exists lg_attributes(class)]} { append properties(sec_legend) " class=\"form-legend\"" } foreach name [array names lg_attributes] { if {$lg_attributes($name) eq ""} { append properties(sec_legend) " $name" } else { append properties(sec_legend) " $name=\"$lg_attributes($name)\"" } } }XQL Not present: Generic, PostgreSQL, Oracle