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. 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. 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.

