If you're using SQLFORM, I did come up with a cute little trick that uses a 
lambda to add placeholders to a custom formstyle definition.

https://groups.google.com/d/msg/web2py/VSr2oLNnozg/jlbbYPaAoiMJ

-- Joe

On Thursday, June 23, 2011 7:24:44 AM UTC-7, Carl Hunter Roach wrote:
>
> I'm using custom forms in my views using this format: 
> {{=form.custom.widget.first_name}} 
>
> I'd like to use HTML's placeholder attribute to input tags: e.g., 
> <input type="text" placeholder="first name" /> 
>
> Today: what are the ways to enable this? Obviously happy to drop the 
> {{=form.custom.widget.first_name}} format and use something else. 
>
> Tomorrow: might it be a good idea to add placeholder attribute to 
> db.Field() in a similar fashion to how 'label' has already been added?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to