Try this: form = auth() form.element(_name='username')['_onfocus'] = "if ( this.value == this.defaultValue ) this.value = '';" form.element(_name='username')['_onblur'] = "if ( this.value == '' ) this.value = this.defaultValue"
On Jul 19, 3:50 am, Rohan <yourbuddyro...@gmail.com> wrote: > I want to customize auth.login form and create an input field for > username/email like > <input title="" type="text" > value="username" name="username" id="username" > class="alignright" > onfocus="if ( this.value == this.defaultValue ) > this.value = '';" > onblur="if ( this.value == '' ) this.value = > this.defaultValue" /> > > using widget customizations {{=form.custom.widget.email}}, I get input > field like > > <input class="string" id="auth_user_email" name="email" type="text" > value=""> > > is there any way to customizing auth.login form to generate the > desired form as specified above? > > I tried using {{=logForm.custom.widget.email.attributes["_class"] = > "alignright"}} but got the error. > > Any pointers?