I want to show a notes field as a text box using a custom widget. In
my edit form I can see the notes field, type in a value, click submit
and the database is updated correctly with the new value. However when
I reopen the edit form the text box shows as empty.
Am I missing something or is this a bug?
My model code is:
def fullwidthwidget(field, value):
return TEXTAREA(_name=field.name,
_id="%s_%s" % (field._tablename, field.name),
_class=field.type,
_value=value,
_style="width:100%",
_rows="3",
requires=field.requires)
and in the define table:
Field("notes2", 'string', widget=fullwidthwidget),