Andy S
unread,Apr 17, 2012, 3:41:49 PM4/17/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SimpleForm
Hi,
Simple Form generates inline-styling when input fields are populated
with existing text. We would like to configure Simple Form so that it
generates no inline styling. Please let us know if you have any tips
on how we can do that.
From the form:
= simple_form_for(resource, :as => resource_name, :url =>
session_path(resource_name)) do |f|
= f.input :login, :as => :string
= f.submit
Simple Form generates the following input field or 'login' if it
already has a value:
<input class="string required" name="user[name]" size="50" type="text"
value="Andy S" style="overflow-x: hidden; overflow-y: hidden; height:
31px; ">
where
style="overflow-x: hidden; overflow-y: hidden; height: 31px; "
is inline-styling generated by simple form. We'd like to generate no
inline styling.
Our Simple Form configuration is:
SimpleForm.setup do |config|
config.wrappers :tag => :p, :class => :input,
:error_class => :error do |b|
b.use :placeholder
b.use :label_input
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
b.use :error, :wrap_with => { :tag => :span, :class => :error }
end
end
Please let us know how if you have any tips on how we can configure
Simple Form to not generate inline-styling for input fields.
Best,
Andreas