Rails issue? HTML issue? Browser issue?

I don’t know if what I am about to describe is a Rails, HTML, browser of some other issue.

My problem: Sometimes the input fields of the following form are pre-filled with things I did not set … like vales from a previous, uh, filling.

Here’s my .erb code taken - more-or-less - from devise-4.3.0/lib/generators/templates/simple_form_for/registrations/new.html.erb

Sign up

<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> <%= devise_error_messages! %>

<%= f.label :email %>
Required (e.g. me@SomeDomain.com)
<%= f.email_field :email, required: true, autofocus: true, value: " " %>

<%= f.label :name %>
Optional
<%= f.text_field :name, value: "This is silly" %>

<%= f.label :password %> <% if @minimum_password_length %> (<%= @minimum_password_length %> characters minimum) <% end %>
<%= f.password_field :password, required: true, autocomplete: "off" %>
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, required: true, autocomplete: "off" %>
<%= f.submit "Sign up" %>
<% end %>

<%= render “devise/shared/links” %>

``

Note, for instance, <%= f.text_field :name, value: "This is silly" %>

``

Sometimes the input value is “This is silly” and sometimes it’s a value a user previously entered.

How do I force the value “This is silly” every time the user refreshes the screen?

Ralph

Hi,

Re: [Rails] Rails issue? HTML issue? Browser issue? nanaya, Sunday, July 23, 2017, 1:54:33 PM, you wrote: **n> Hi,