# Form field contains spurious text when it should be blank

**URL:** <https://www.ruby-forum.com/t/form-field-contains-spurious-text-when-it-should-be-blank/175083>\
**Category:** Rails\
**Created:** [September 7, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/form-field-contains-spurious-text-when-it-should-be-blank/175083 "2009-09-07T15:23:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [September 7, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/form-field-contains-spurious-text-when-it-should-be-blank/175083/1 "2009-09-07T15:23:53Z")

</div>

I have one form, for the field User expiry\_page\_url. The rails code  
looks like this

```
<div class='field'>
  <label for="user_expiry_page_url">Expiry page url - make sure you

```

include the full url, starting with ‘http://’. If no url is entered,  
the user will be sent to the default \<%= link\_to “demo\_expired”,  
:controller =\> “user”, :action =\> “demo\_expired” %\> page when their  
account expires.  
\<%= text\_field\_tag ‘user[expiry\_page\_url]’, @user.expiry\_page\_url,  
:size =\> 45 %\>

and the generated html looks like this (for an example where the field  
is blank for the user in question)

```
<div class='field'>
  <label for="user_expiry_page_url">Expiry page url - make sure you

```

include the full url, starting with ‘http://’. If no url is entered,  
the user will be sent to the default demo\_expired page when their account  
expires.

My problem is, that if the expiry\_page\_url value is blank, then the text  
‘max’ appears in the box. Now, this is my username for the site, and  
what i’m suspecting is that firefox is remembering this (when i log in)  
and for some reason shoving it into the user\_expiry\_page\_url field, on  
this edit\_user page. It must be something happening after page load  
because the value="" in the html.

Has anyone else had this sort of thing happening?

thanks  
max
