template::element::set_properties (public)

 template::element::set_properties form_id element_id [ args... ]

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

Modify properties of an existing element. The same options may be used as with the create command. Most commonly used to set the default value for an element when a form page is initially requested.

Parameters:
form_id (required)
The identifier of the form containing the element.
element_id (required)
The unique identifier of the element.
See Also:

Testcases:
No testcase defined.
Source code:
    get_reference

    # create a reference to opts as expected by get_opts
    upvar 0 element opts

    template::util::get_opts $args

    if { $opts(widget) eq "hidden"
         && [info exists opts(sign)]
         && $opts(sign)
         && [info exists opts(value)] } {
        if { [template::element::exists $form_id $element_id:sig] } {
            template::element::set_properties $form_id $element_id:sig  -value [ad_sign $opts(value)]

        } else {
            template::element::create $form_id $element_id:sig  -datatype text  -widget hidden  -value [ad_sign $opts(value)]
        }
    }

    copy_value_to_values_if_defined
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: