On Monday, January 19, 2015 at 12:58:04 PM UTC-8, Dave S wrote:
>
>
> On Sunday, January 18, 2015 at 7:37:59 PM UTC-8, Wes H wrote:
>
 

> [...] 
>
>> You could also attempt to solve the root problem (css) by adding your own 
>> custom css that takes precedence over the included styles:
>>
>> In your custom.css:
>> input.activation { width:50px; }
>> and then in your controller:
>> INPUT(_name='left', requires=[IS_NOT_EMPTY(), IS_HEXSTR()], _class=
>> 'activation'),
>>
>>
> This suggestion was able to change the visual size of the input box, but 
> allowed long strings to be entered, so it's part way there but ....
>

Went back to W3, and figured out the additional change need for limiting 
the input:

INPUT(_name='left', requires=[IS_NOT_EMPTY(), IS_HEXSTR()], _type="text", 
_maxlength="4", _class='activation')

(the '_type="text"' can be omitted, seems to be the default)

This doesn't work with pasting "1234-5678-90ab-cdef"; the excess characters 
just get ignored, but it does avoid accepting too many characters.

Thanks for the help so far!

/dps

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

Reply via email to