placeholders = {
    "name": "fill in your name",
   "email": "enter a valid email address"
}

for input in form.elements("input[type='text']"):
    input["_placeholder"] = placeholders.get(input["_name"], "")


On Wed, Aug 29, 2012 at 3:07 PM, Alec Taylor <[email protected]> wrote:

> Thanks, also would there be a loop I can add before that to set the
> placeholder of each input?
>
> On Thu, Aug 30, 2012 at 3:58 AM, Bruno Rocha <[email protected]>
> wrote:
> > for label in form.elements('label'):
> >     label["_style"] = "display:none;"
> >
> >
> >
> >
> > On Wed, Aug 29, 2012 at 2:47 PM, Alec Taylor <[email protected]>
> wrote:
> >>
> >> How do I remove labels from forms?
> >>
> >> I want to use placeholders instead...
> >>
> >> (this is for the auth.register form)
> >>
> >> Thanks for all suggestions,
> >>
> >> Alec Taylor
> >>
> >> --
> >>
> >>
> >>
> >
> >
> > --
> >
> >
> >
>
> --
>
>
>
>

-- 



Reply via email to