Robin Haswell wrote: > I feel your pain dude, I'm in the same situation. However i have a lot > more form work to do so I'm sticking with TG and I think that experience > will lead to huge productivity gains later on in the project. > > I'm a PHP programmer too and I do my form the same way. I think the best > way this can be solved is by adding a name attribute to the submit > button. That's gonna need patching TG though, at least according to my > .9a1 source. You could add a hidden attribute to all your forms and test > that for an action, a la the 20 minute wiki - bit messy though. I think > PHP's relaxed variable declarations help a lot more with CRUD than > Python's restrictions. Perhaps all that's needed is a perspective shift. >
There is no need to patch TG to add a name to your SubmitButton: >>> from turbogears.widgets import * >>> submit = SubmitButton() >>> submit.render() '<INPUT TYPE="submit" CLASS="submitbutton">' >>> submit = SubmitButton(name="myaction") >>> submit.render() '<INPUT TYPE="submit" CLASS="submitbutton" NAME="myaction" ID="myaction">' >>> to use it in your existing form: mysubmit = SubmitButton(name="mysubmit") myform = TableForm(fields=..., submit=mysubmit) Ciao Michele PS I've read all the discussion, just replying to your message ;-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

