Skip to Content Skip to Menu

🐰 Happy Easter! Great savings on Professional and Developer Memberships! Get 20% off now with code EASTER-2025!

Javascript Onblur for registration form

13 years 2 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