Multiple submit buttons with formless
First my question: is there an alternate way to do multiple submit buttons with formless than adding annotate.Button()'s? Maybe the annotate.List or Group stuff, whatever those do? I'm hoping someone will say, "You idiot, you don't just do it by sticking more Button()s in." I ask, because ButtonRenderer is broken, and has been broken for a while, and I can't imagine that people have only needed one button. It's broken because there are no 'name' attributes in the <input> tag, and thus no way to distinguish the buttons. There are several ways to fix this: patch the code (submitted to issues by me and others), "patch" the ButtonRenderer class like ButtonRenderer.rend = lambda c, d: input(type='submit', value=d.label, name=d.name, id=keyToXMLID(c.key)) or create your own renderer (code attached). Yet another way is to do your own layout and get the button info from request.args (example stan attached). Hope this will be helpful to somebody, I'm still groping my way through this. Dave Cook
participants (1)
-
Dave Cook