输入字段在视图中不可见(simple_form_for)

时间:2022-03-29 15:57:25

For some reason, my newly created input fields (description and title) are not visible when I load the view page. When I check the inspector there is a CSS element 'display: none' but why the hell would it want to hide elements by default? I don't have any display:none in my CSS files ...

出于某种原因,当我加载视图页面时,我新创建的输入字段(描述和标题)不可见。当我检查检查器时,有一个CSS元素'display:none',但为什么它默认会隐藏元素呢?我的CSS文件中没有任何显示:none ...

<%= simple_form_for(@ad) do |f| %>
  <%= f.input :website %>
  <%= f.input :title %>
  <%= f.input :description %>
  <%= f.input :photo %>
  <%= f.input :photo_cache, as: :hidden %>
  <%= f.submit 'publish my ad!'%>
<% end %>
<%= link_to "home", root_path %>'

1 个解决方案

#1


0  

try to understand where that rule is applied

尝试了解该规则的应用位置

find out with the debugger tools the css stylesheet applying the rule.

使用调试工具找出应用规则的css样式表。

输入字段在视图中不可见(simple_form_for)

#1


0  

try to understand where that rule is applied

尝试了解该规则的应用位置

find out with the debugger tools the css stylesheet applying the rule.

使用调试工具找出应用规则的css样式表。

输入字段在视图中不可见(simple_form_for)