Would that go in the view file?

On Sat, Nov 8, 2008 at 7:37 AM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> You can use juery to change them
>
> <script>
> $(document).ready(function() {$
> ('#student_last_name').attr('maxlength','30'); });
> </script>
>
> On Nov 8, 1:07 am, billf <[EMAIL PROTECTED]> wrote:
>> I believe that you can set the attributes on an <input type="text"...>
>> but only if you create it specifically as in:
>>
>> INPUT(_type='text',_name='student_last_name',_value='Smith',_size='20',_maxlength='30')
>>
>> ...as all attributes prefixed '_' are used to create html tag
>> attributes.
>>
>> At the moment, I don't believe that you can just specify values for
>> size and maxlength anywhere and they will be automatically included
>> when the FORM is created.  This re-raises the question of "if you
>> could where would you put it?" as is it view information or model
>> information :-)
>>
>> On Nov 7, 5:26 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
>>
>> > On Fri, Nov 7, 2008 at 10:17 AM, mdipierro <[EMAIL PROTECTED]> wrote:
>>
>> > > requires=IS_LENGTH(256)
>>
>> > > this is automatic for SQLFORMs if a SQLField(....,length=256)
>>
>> > > On Nov 7, 11:08 am, "Wes James" <[EMAIL PROTECTED]> wrote:
>> > >> How do you set on a per field basis the maxlength - i.e., the total
>> > >> text someone can type in a form input field.  Can this be done in
>> > >> db.py?
>>
>> > >> -wj
>>
>> > there should be maxlenth='sqlfield.length' like process in the in the
>> > html input field creation for the maxlength to work right on web
>> > pages.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to