Page 1 of 1

Question about HTML forms

Posted: Mon Dec 21, 2009 12:12 am
by OldRod
I have a registration form, but when the page loads up, it shows the name and password of my mySQL setup by default in the 'username' and 'password' fields of the form.

Is there a way to force the fields in the form to be blank on startup?

Re: Question about HTML forms

Posted: Mon Dec 21, 2009 12:17 am
by Sakar
Could we see your code? Hard to tell why it's doing that without seeing the code ;)

Re: Question about HTML forms

Posted: Mon Dec 21, 2009 12:19 am
by Falken
Maybe it is browsers auto complete function that does that. If you want it to be disabled for a field you can add

Code: Select all

autocomplete="off"
to the field tag. Altho this is not valid HTML/XHTML, so your page wont validate if you use this.

Re: Question about HTML forms

Posted: Mon Dec 21, 2009 12:56 am
by OldRod
*edit* it's fixed - see below :)

Re: Question about HTML forms

Posted: Mon Dec 21, 2009 1:18 am
by OldRod
Ok, an update - I am using Firefox and I checked the saved password list. Localhost had a saved password, so I deleted it.

That took care of the password field being filled in, but "root" is still showing up in the email address field. :?:

Re: Question about HTML forms

Posted: Mon Dec 21, 2009 2:34 am
by OldRod
Ok, I restarted Firefox and the problem went away - must have been something in the cache I guess.

Sorry for the bother :)