local(clientparams = .'clientparams' -> asstring)
// look for submit buttons, the least destructive first
with i in array('cancel', 'save', 'add', 'search', 'delete') do => {
if(#clientparams >> 'button_' + #i
|| #clientparams >> 'button_' + #i + '.x'
|| #clientparams >> 'button_' + #i + '.y') => {
.'formbutton' = #i
return #i
}
}
coercing the object to a string means that buttons named 'button_saveaddanother' and 'button_savecheckout' both return 'save' for form -> getbutton. The workaround is to insert an arbitrary string that does not much any of the five values in the array.
This is madness.
https://github.com/knop-project/knop/blob/master/knop9/knoplibs/knop_form.lasso#L1042-L1054
coercing the object to a string means that buttons named 'button_saveaddanother' and 'button_savecheckout' both return 'save' for
form -> getbutton
. The workaround is to insert an arbitrary string that does not much any of the five values in the array.