Skip to Content Skip to Menu

Javascript Onblur for registration form

12 years 10 months ago #188636 by cristianfaber
Javascript Onblur for registration form was created by cristianfaber
Hi,

I'm having a problem with a registration form for a client's website: there is this registration form generated by CB 1.7, the labels of the fields are inside them (value="name"). It causes that when the visitors fill out the form they usually forget to delete the initial label and type their names, so we get things like "NameJohn Smith" instead of "John Smith" only.

The solution would be to add a javascript to the fields:

onfocus="if(this.value=='Name') this.value='';" onblur="if(this.value=='') this.value='Name';"

Is there an option on CB's admin to solve that problem?

If not, is there a way to implement this javascript on CB's registration form?

Thanks

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum