> Since the name in the default form is "delete_this_record", shouldn't
this be found in form.custom.delete_this_record also?
In case it should, here is a patch for allowing queries to the deletable
widget by it's form name
--
diff -r 13d7e5ff851d gluon/sqlhtml.py
--- a/gluon/sqlhtml.py Tue Dec 25 12:21:08 2012 -0600
+++ b/gluon/sqlhtml.py Tue Dec 25 19:38:32 2012 -0300
@@ -235,7 +235,6 @@
raise SyntaxError(
'widget cannot determine options of %s' % field)
opts = [OPTION(v, _value=k) for (k, v) in options]
-
return SELECT(*opts, **attr)
@@ -1154,7 +1153,8 @@
_id=self.FIELDKEY_DELETE_RECORD + SQLFORM.ID_LABEL_SUFFIX),
widget,
col3.get(self.FIELDKEY_DELETE_RECORD, '')))
- self.custom.deletable = widget
+ self.custom.deletable = \
+ self.custom[self.FIELDNAME_REQUEST_DELETE] = widget
# when writable, add submit button
self.custom.submit = ''