Jump to content

Password change in form field. Can I Prevent pre-filling it?


rudyten2000

Recommended Posts

i have a Form that allows a user to change password.

 

I capture NEW PASSWORD

Then I make user RE-ENTER NEW PASSWORD

 

and then I capture current password.

 

Works all good.

 

But.. Sometimes firefox, IE, remembers values.... So on change, instead of being BLANK it is initialized with "****"

 

I want all 3 PWD to be BLANK on arrival, and to be always be BLANK on any ERROR error.

 

 

Am not sure this is even possible.....

 

 

Thanks

Rudy

 

PS, Nice job on forum

Link to comment
Share on other sites

Possibly, you could slightly change the naming structure. Instead of "password", you could name it "pass word" or "pass-word" or "*password". Maybe..?

 

I know if you name input fields something different FX won't pre-fill them. But, in this case, FX is actually remembering it, maybe different?

Edited by Eric
Link to comment
Share on other sites

This maybe a refresh issue being new to html this is what I experienced when working with fields on a browser within my local machine

1. if I add an entry then press Function5 (F5) button my entry remains.

2. If I make a change to the source file and save (open press space bar)

3. now press F5 button everything clears

 

Not sure if this is the issue

Edited by gazdzid
Link to comment
Share on other sites

Nope, I gave up on it... have bigger fish to fry.

 

I guess it has to do with browser setting of auto-fill

 

If i clear everything in options, then it looks nice...minute i type something in...firefox asks me if i wanna save it.. then it starts all over if i say yes.

 

I guess the key thing is to use a different form field name, make sure it does not to match the form field name in the login page.

 

Thanks for the input anyways guys

 

Rudy

Link to comment
Share on other sites

script Code:

<br />/*<![CDATA[*/<br />function clearText(field){<br />          if (field.defaultValue == field.value) field.value = '';<br />          else if (field.value == '') field.value = field.defaultValue;<br />      }<br />/*]]>*/<br />

 

HTML code:


Your First Name:


The onfocus/onblur will empty the text field on focus and replace the default value if it remains empty.

 

Demo: http://www.jlhaslip.trap17.com/scripts/sticky_redux.php

 

Try adding you first name and then click on the last name field, then the submit button to see how it works.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...