Rails issue? HTML issue? Browser issue?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rails issue? HTML issue? Browser issue?

Ralph Shnelvar
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
<div class='ralph-h2'>Sign up</div>

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

 
<div class="field">
   
<%= f.label :email %>
   
<div><em>Required (e.g. [hidden email])</em></div>
   
<%= f.email_field :email, required: true, autofocus: true, value: " " %>
 
</div>

 
<br />

 
<div class="field">
   
<%= f.label :name %>
   
<div><em>Optional</em></div>
   
<%= f.text_field :name, value: "This is silly" %>
 
</div>

 
<br />

 
<div class="field">
   
<%= f.label :password %>
   
<% if @minimum_password_length %>
     
<em>(<%= @minimum_password_length %> characters minimum)</em>
   
<% end %><br />
   
<%= f.password_field :password,  required: true, autocomplete: "off" %>
 
</div>

 
<div class="field">
   
<%= f.label :password_confirmation %><br />
   
<%= f.password_field :password_confirmation,  required: true, autocomplete: "off" %>
 
</div>

 
<div class="actions">
   
<%= f.submit "Sign up" %>
 
</div>
<% 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

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/95e3557c-b11d-485b-b4b1-37eb61163e15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rails issue? HTML issue? Browser issue?

nanaya-2
Hi,

On Sun, Jul 23, 2017, at 22:22, Ralph Shnelvar wrote:
> 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.
>

Are you using firefox? It keeps form values on reload [1].

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=46845

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1500839673.3593585.1049996352.0F6AE9F8%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rails issue? HTML issue? Browser issue?

Ralph Shnelvar
Re: [Rails] Rails issue? HTML issue? Browser issue? nanaya,



Sunday, July 23, 2017, 1:54:33 PM, you wrote:

n> Hi,

n> On Sun, Jul 23, 2017, at 22:22, Ralph Shnelvar wrote:
>> 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.


n> Are you using firefox? It keeps form values on reload [1].

n> [1]
https://bugzilla.mozilla.org/show_bug.cgi?id=46845

10 months ago Mark C wrote "This is madness".

I completely agree.  A bug that was reported 17 years ago seems to keep coming back.

Thank you, nanaya.  Now I can move on to other problems.


Ralph

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/999396183.20170723221932%40dos32.com.
For more options, visit https://groups.google.com/d/optout.
Loading...