Simple Form gem:不显示Internet Explorer V6-9的占位符 - Rails

时间:2017-03-22 20:40:06

标签: jquery html ruby-on-rails internet-explorer simple-form

我使用带有Rails的Simple Form Gem并且已经意识到占位符不会显示使用Internet Explorer版本6-9。这真的会影响我想要的网站布局。我无法找到有关此内容的最新信息,尤其是与简单表单无关的信息。有什么办法吗?在我的主页的一部分它应该看起来像下面的图像,但在IE上它只显示为空的白色表格框,不好。我真的不想为每个盒子放置标签。任何帮助都会非常感谢! enter image description here

<%= simple_form_for @client, url: client_path, namespace: 'qq1' do |f| %>
                <%= f.input :first_name, placeholder: "First Name", id: "first_name", label: false %>
                <%= f.input :last_name, placeholder: "Surname", id: "surname", label: false %>
                <%= f.input :email, placeholder: "Email", id: "email", label: false %>
                <%= f.input :phone, placeholder: "Phone Number", id: "phone", label: false %>
                <div class="col-md-12 text-right">
                    <%= f.submit "Next", 'data-disable-with' => "Loading...", class: "btn btn-outline btn-xl", id: "send" %>
                </div>
<% end %>

HTML:

<form novalidate="novalidate" class="simple_form new_client" id="qq1_new_client" action="/client" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="6J7tSBjzaHvJs/5aNG1tMDTjhUO5LReFXENA6ZMOrsZEQWGwblvXl6YWP7YGc5dTuD7gsUjhTlJMFqTApqBxTw==" />
                <div class="form-group string optional client_first_name"><input class="form-control string optional" placeholder="First Name" type="text" name="client[first_name]" id="qq1_client_first_name" /></div>
                <div class="form-group string optional client_last_name"><input class="form-control string optional" placeholder="Surname" type="text" name="client[last_name]" id="qq1_client_last_name" /></div>
                <div class="form-group email optional client_email"><input class="form-control string email optional" placeholder="Email" type="email" name="client[email]" id="qq1_client_email" /></div>
                <div class="form-group tel optional client_phone"><input class="form-control string tel optional" placeholder="Phone Number" type="tel" name="client[phone]" id="qq1_client_phone" /></div>
                <div class="col-md-12 text-right no-right-pad">
                    <input type="submit" name="commit" value="Next" data-disable-with="Loading..." class="btn btn-outline btn-xl" id="send" />
                </div>
                <div class="col-md-12">
                    <div id="success">
                    </div>
                </div>

0 个答案:

没有答案