I just discovered that dictform and smartdictform override my "requires" 
and add their own, based on the type of the Field.  It somewhat defeats the 
purpose of having a custom widget.

-- Joe

On Sunday, August 25, 2013 7:51:30 AM UTC-7, Niphlod wrote:
>
> -1 on the patch.
>
> I don't really get it. Why do you (and all of us) need yet another 
> attribute (too many already) of the Field when we have widget= for it ?
> Is it really that hard to do
>
> def my_string_widget(field, value): 
>     return INPUT(_name=field.name, _id="%s_%s" % (field._tablename, 
> field.name), 
>     _class="whatever", 
>     _value=value,
>     _required=""
>     requires=field.requires) 
>
> Field('comment', 'string', widget=my_string_widget)
>
> that enables you to do all sorts of crazy things with your own widget ?!
>
>
>
>
>
> On Sunday, August 25, 2013 4:36:45 PM UTC+2, mr.freeze wrote:
>>
>> Thanks Anthony.  This is good for a specific use case but my patch would 
>> allow for arbitrary modification of a field's default widget output.  I 
>> think this could be generally useful.  
>>
>> On Sunday, August 25, 2013 9:04:20 AM UTC-5, Anthony wrote:
>>>
>>> Check out http://dev.s-cubism.com/plugin_notemptymarker.
>>>
>>> Anthony
>>>
>>

-- 

--- 
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/groups/opt_out.

Reply via email to