Is it possible to have a string or text field's length parameter
automatically populate the SQLFORM-generated input's maxlength?
Such that:
Field('personname', 'string', length=32, label='First name',
requires=[IS_LENGTH(32), IS_NOT_EMPTY()]),
Will produce:
<input class="string" id="table_personname" name="personname" value=""
maxlength="32" type="text"></input>
I know I can add the parameter to the form in the controller, but this
makes maintenance tougher if the field is used all over the place.
Many thanks,
Tim
--
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.