Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.59.2.6 -r1.59.2.7 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 23 Feb 2023 12:04:47 -0000 1.59.2.6 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 29 Mar 2023 13:23:43 -0000 1.59.2.7 @@ -231,26 +231,15 @@ # Otherwise, find out now - set formbutton {} - # If the form isn't being submitted at all, no button was clicked - if { $id ne [ns_queryget form:id] } { + if { ![ns_conn isconnected] || $id ne [ns_queryget form:id] } { return {} } # Search the submit form for the button - set form [ns_getform] + set formbutton [lindex [ns_set keys [ns_getform] "formbutton:*"] 0] + regsub {^formbutton:} $formbutton {} formbutton - if { $form ne "" } { - set size [ns_set size $form] - for { set i 0 } { $i < $size } { incr i } { - if { [string match "formbutton:*" [ns_set key $form $i]] } { - set formbutton [string range [ns_set key $form $i] [string length "formbutton:"] end] - break - } - } - } - return $formbutton }