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):
- 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 $formbuttonXQL Not present: Generic, PostgreSQL, Oracle