You are right. I forgot to mention, I was trying to work it with 'list:string'
And it breaks the list. On Friday, February 5, 2016 at 3:32:02 PM UTC-5, Anthony wrote: > > Works for me. Must be a problem somewhere else in your code. > > On Friday, February 5, 2016 at 3:15:27 PM UTC-5, Ron Chatterjee wrote: >> >> Is there a similar widget that works for the string? >> >> Because when I do the following, it doesn't work >> >> >> Field(..., >> widget=lambda f,v: SQLFORM.widgets.string.widget(f, v, >> _placeholder='Enter your comment here')) >> >> >> >> >> On Wednesday, November 16, 2011 at 5:04:05 AM UTC-5, thodoris wrote: >>> >>> Thnx a lot! >>> >>> On Nov 16, 10:42 am, Anthony <abasta...@gmail.com> wrote: >>> > You can use a comment instead of a default: >>> > >>> > Fields(..., comment='Enter your comment here') >>> > >>> > though that will display next to or below the input field (depending >>> on >>> > your formstyle) rather than in the text box itself. >>> > >>> > As an alternative, you can set the HTML5 'placeholder' attribute for >>> the >>> > input field by customizing the field's widget: >>> > >>> > Field(..., >>> > widget=lambda f,v: SQLFORM.widgets.text.widget(f, v, >>> > _placeholder='Enter your comment here')) >>> > >>> > Anthony >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > On Wednesday, November 16, 2011 4:24:54 AM UTC-5, thodoris wrote: >>> > >>> > > Hello, >>> > >>> > > I have a text field in my db with a default instructive text like >>> > > "Enter your comment here", but i would like when the user tries to >>> > > input text, the default text to disappear without having to delete >>> it >>> > > manually >> >> -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.