On Tuesday, July 26, 2016 at 10:29:26 AM UTC-7, icodk wrote: > > Dave S > Thanks, you put me on the right track. What works for me is:: > > db.tabl1.field1.widget= lambda f, v: SQLFORM.widgets.string.widget(f, v, > _size=50) > > This is basically taken from Antony's post you pointed out. > Your answer with form.custom does not apply because I have no form.custom. > The form is automatically generated by the SQLFORM.grid which I have no > idea how to get to. >
I used just SQLFORM, and form.custom worked for me with no effort beyond that. > In general it could be nice to know how to manipulate the Edit/New forms > generated by the grid and smartgrid. Could not find any docs about it yet. > See the docstrings for the classes, I guess. However, the SQLFORM family is Massimo's least-favorite part of web2py, in part because of unruly growth, so the next generation is likely to leave more of that to the client side (e.g., javascript libraries). Datatables.js is a library Massimo likes, and backgrid.js is another one discussed here. I'm not seeing the discussion in the developers' group, so I'm not sure if there was a web3py js library being proposed. /dps > On Monday, July 25, 2016 at 11:00:49 PM UTC+2, icodk wrote: >> >> How can I change the input field size (what is visible to the user) of >> SQLFORM.grid auto generated Edit/New forms. >> Tried with length=50 but the fields are still about 20 chars long. >> Also: IS_LENGTH(minsize=5,maxsize=50) had no visible effect. None of >> the settings limits the number of chars user can type in. Only when >> submitting the form you get an error message. But this might be >> the intended design. >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

