views:

215

answers:

2

I have both a text_field and a text_area in Rails, and I want to disable the browser's auto-complete. Setting the attribute in either the text_field, text_area, or in the form itself, doesn't seem to make the browser stop trying to auto-complete. This is for Firefox 3.6.3 on OS X. Maybe it's more a browser issue than a RoR issue.

Thanks!

A: 

What's the view source on your page look like? I tried this in FF 3.6.3 OSX and it worked.

<html>
<head>
</head>
<body>
<form>
  <input type="text" name="name" autocomplete="off"/>
</form>
</body>
</html>

Taking out the autocomplete made it autocomplete. Maybe you have a plugin overriding the default behavior.

MattMcKnight
It turns out there was an ajax function that was replacing the input box with its own dynamic one. It really helped to know that it had nothing to do with Rails, so thanks!
dt
A: 

I am new on ROR.Please give me the code that How to take user input from browser?

Arun Sharma