Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inputs inside disabled fieldset are submited on remote: true forms #36728

Closed
duleorlovic opened this issue Jul 22, 2019 · 0 comments · Fixed by #36764
Closed

Inputs inside disabled fieldset are submited on remote: true forms #36728

duleorlovic opened this issue Jul 22, 2019 · 0 comments · Fixed by #36764

Comments

@duleorlovic
Copy link
Contributor

Steps to reproduce

Inside disabled fieldset, all controls are disabled mozilla.org and that works as intended for local: true forms (those fields are not send when form is submitted).
When we use local: false forms those input fields are send to server:

<%= form_with(model: post, local: false) do |form| %>
  <fieldset disabled>
    <%= form.text_field :title %>
  </fieldset>
  <%= form.submit %>
<% end %>

Expected behavior

It should not send title field.

Actual behavior

In above example, when form is remote (ajax), title field is sent even it is inside disabled fieldset.

System configuration

I notice this issue is on Rails 5.1.0 and later
On Rails 4.2.11 and 5.0.0 it does not happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants