template::widget::search (public)

 template::widget::search element_reference tag_attributes

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

Return a widget consisting of either a search box or a search pull-down list. Here is an example of using the search widget with ad_form:

    ad_form -name test -form {
        {user:search,optional
            {result_datatype integer}
            {label "Email"}
            {help_text "Search for a user by email address"}
            {search_query {
                select email from cc_users where lower(email) like '%'||lower(:value)||'%'
            }}
        }
    }
Can be either a select widget initially if options supplied or a search box which on submit changes to a select widget.

Parameters:
element_reference - Reference variable to the form element
tag_attributes - If the "options" attribute is passed in, a select widget is created, otherwise a search box.
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::select template::widget::select (public) template::widget::search template::widget::search template::widget::search->template::widget::input template::widget::search->template::widget::select

Testcases:
No testcase defined.
[ show source ]
Show another procedure: