how to not generate inline styling with simple form

34 views
Skip to first unread message

Andy S

unread,
Apr 17, 2012, 3:41:49 PM4/17/12
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

Rafael Mendonça França

unread,
Apr 17, 2012, 3:59:09 PM4/17/12
to plataformate...@googlegroups.com
Sorry but SimpleForm doesn't generates any inline-styling. This can be added by other plugin, but not by SimpleForm.

Andy S

unread,
Apr 17, 2012, 4:52:02 PM4/17/12
to SimpleForm
You are correct, I did some debugging and found the offending code in
another framework.

Thank you!

Best,
Andreas

On Apr 17, 12:59 pm, Rafael Mendonça França <rafaelmfra...@gmail.com>
wrote:
> Sorry but SimpleForm doesn't generates any inline-styling. This can be added by other plugin, but not by SimpleForm.
>
> --
> Rafael Mendonça Françahttp://twitter.com/rafaelfrancahttps://github.com/rafaelfranca
> Sent with Sparrow (http://www.sparrowmailapp.com)
Reply all
Reply to author
Forward
0 new messages