template::form::get_action (public)
template::form::get_action id
Defined in packages/acs-templating/tcl/form-procs.tcl
Find out which action is in progress. This is the name of the button which was clicked when the form was in display mode.
- Parameters:
- id (required)
- The ID of an ATS form object.
- Returns:
- the name of the action in progress
- 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:formaction formaction # If we've already found the action, just return that if { [info exists formaction] } { return $formaction } # Otherwise, find out now set formaction {} # If the form isn't being submitted at all, there's no action if { $id ne [ns_queryget "form:id"] } { return {} } set formbutton [get_button $id] # If we were in display mode, and a button was clicked, we should be in edit mode now if { [ns_queryget "form:mode"] eq "display" && $formbutton ne "" } { set formaction $formbutton return $formaction } # Otherwise, there should be a form:formaction variable in the form set formaction [ns_queryget "form:formaction"] return $formactionXQL Not present: Generic, PostgreSQL, Oracle