【发布时间】:2020-07-13 14:38:38
【问题描述】:
我为我的用户数据库创建了一个表单来更改他的密码,如下所示:
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
<%= f.hidden_field :reset_password_token %>
<div class="container">
<form action="/action_page.php">
<%= f.label :password, "Nova senha" %><br />
<% if @minimum_password_length %>
<em>(Mínimo de <%= @minimum_password_length %> caracteres)</em><br />
<% end %>
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
</div>
<div class="container">
<%= f.label :password_confirmation, "Confirmar nova senha" %><br />
<%= f.password_field :password_confirmation, autocomplete: "off" %>
</form>
</div>
<div class="actions">
<%= f.submit "Alterar minha senha" %>
</div>
<% end %>
问题是我的 f.submit "Alterar minha senha" 不起作用,它没有收到我的点击操作。我该如何解决?
【问题讨论】:
-
如果你发布了渲染的 HTML,我们可以告诉你吗?如果表单中的任何内容都称为提交,则无法使用脚本提交表单
标签: html css ruby-on-rails