On May29, 3:32pm, annet <annet.verm...@gmail.com> wrote: > I use the comment attribute to mark fields that are required: > > db.rechtsvorm.rechtsvorm.comment=SPAN('*',_class='required') > > The * displays to the right of the input field. However, when I have a > table that contains an SQLField of type text, all the * move too far > away from the input field. I wonder whether it is possible to add the > comment to the second column of the table instead of displaying it in > the third. > > Kind regards, > > Annet.
It can be done by customizing your own widget, but it seems to be an overkill. How about just manually append an "(*)" at the end of your label like this? db.Field('rechtsvorm', label='Blah (*)', requires=IS_NOT_EMPTY()) By the way, the length of SQLField('foo','text') can be changed by modifying views/web2py_ajax.html: $('input.string').attr('size',10); --~--~---------~--~----~------------~-------~--~----~ 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 web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---