Home
The Toolkit for Online Communities
17450 Community Members, 0 members online, 2103 visitors today
Log In Register
OpenACS Home : ACS API Browser : template::widget::search

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 text 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 text box.
Returns:
Form HTML for widget
[ show source ]
Show another procedure: