*cheers

I must of been blind not to see that last night

ty very much

On Tue, Jan 17, 2012 at 5:51 AM, Anthony <[email protected]> wrote:

> db.define_table('contrib',
>>     Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
>> writable=False),
>>     Field('title'),
>>     Field('contributions','text',**requires=IS_NOT_EMPTY()))
>>
>> Controller Code
>>
>> @auth.requires_membership('**admin')
>> def contributions():
>>     db.contrib.contributions = advanced_editor
>>
>
> db.contrib.contributions is a Field object that is part of the contrib
> table -- you cannot (and do not want to) replace it. Perhaps you're trying
> to set the field's widget:
>
> db.contrib.contributions.widget = advanced_editor
>
> This can also be done in the field's initial definition:
>
> db.define_table('contrib', Field('contributions', ...,
> widget=advanced_editor))
>
> See http://web2py.com/books/default/chapter/29/7#Widgets.
>
> Anthony
>

Reply via email to