[web2py] Re: Cool "formstyle" trick w/Python lambda

2020-03-19 Thread Andrew Rogers
Thanks. That helped me too! But i have no idea how it did it. Need to read up on widgets. All i wanted to do was add the "readonly" attribute to a form field. I thought the following would have worked (from the book). Is it intended to add attributes? If you need to add custom attributes to

Re: [web2py] Re: Cool formstyle trick w/Python lambda

2013-08-09 Thread Richard Vézina
You are my man Anthony! On Thu, Aug 8, 2013 at 4:04 PM, Anthony abasta...@gmail.com wrote: Nice. I think we should add an argument to Field() that takes a dictionary of args to pass to the field's widget (or maybe just add **kwargs to Field() and pass kwargs to the widget). For now, though,

[web2py] Re: Cool formstyle trick w/Python lambda

2013-08-08 Thread Anthony
Nice. I think we should add an argument to Field() that takes a dictionary of args to pass to the field's widget (or maybe just add **kwargs to Field() and pass kwargs to the widget). For now, though, if that's all you want to do, you can do something like this: def widget(**kwargs):