So, you can do:
form.custom.widget.password[0]["_placeholder"] = T("Lozinka")
or
form.element('input[type=password]')['_placeholder'] = T("Lozinka")
or handle it in the model:
Field('password', 'password',
widget=lambda f, v: SQLFORM.widgets.password.widget(f, v, _placeholder
=T("Lozinka")))
Note, I don't think placeholders in password fields work in all browsers,
though there are some Javascript hacks for those cases (Google it).
Anthony
On Tuesday, April 23, 2013 8:10:40 AM UTC-4, Niphlod wrote:
>
> that in recent web2py's the widget password is a "CAT" of an INPUT and a
> STRING ....
>
> see
> https://groups.google.com/forum/?fromgroups=#!searchin/web2py/placeholder$20password/web2py/gryhO1DGfOQ/UQoBVu3rFKQJfor
> additional details
>
> On Tuesday, April 23, 2013 1:33:26 PM UTC+2, Domagoj Kovač wrote:
>>
>> Hi,
>>
>> i have a code:
>>
>> {{form.custom.widget.email["_placeholder"] = T("E-mail adresa")}}
>> {{=form.custom.widget.email}}
>>
>> And here i get placeholder attribute on my input element, while here:
>>
>> {{form.custom.widget.password["_placeholder"] = T("Lozinka")}}
>> {{=form.custom.widget.password}}
>>
>> i don't get placeholder attribute. What is the issue?
>>
>
--
---
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/groups/opt_out.