template::form::get_button (public)

 template::form::get_button id

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

Find out which button was clicked

Parameters:
id (required)
The ID of an ATS form object.
Returns:
the name of the button clicked

Partial Call Graph (max 5 caller/called nodes):
%3 packages/forums/lib/message/post.tcl packages/forums/ lib/message/post.tcl template::form::get_button template::form::get_button packages/forums/lib/message/post.tcl->template::form::get_button packages/forums/www/message-post.tcl packages/forums/ www/message-post.tcl packages/forums/www/message-post.tcl->template::form::get_button template::form::create template::form::create (public) template::form::create->template::form::get_button template::form::get_action template::form::get_action (public) template::form::get_action->template::form::get_button template::adp_level template::adp_level (public) template::form::get_button->template::adp_level

Testcases:
No testcase defined.
Source code:
    # keep form properties and a list of the element items
    upvar #[template::adp_level$id:button formbutton

    # If we've already found the button, just return that
    if { [info exists formbutton] } {
        return $formbutton
    }

    # Otherwise, find out now

    # If the form isn't being submitted at all, no button was clicked
    if { ![ns_conn isconnected] || $id ne [ns_queryget form:id] } {
        return {}
    }

    # Search the submit form for the button
    set formbutton [lindex [ns_set keys [ns_getform"formbutton:*"] 0]
    regsub {^formbutton:} $formbutton {} formbutton

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