add in html markup to the right of a form field

480 views
Skip to first unread message

Phil Swenson

unread,
Jul 14, 2012, 6:07:29 PM7/14/12
to plataformate...@googlegroups.com
If I want to add some HTML markup (A link in my case) to the right of a form field input.... what is the right approach?

Thanks for any thoughts.

Carlos Antonio da Silva

unread,
Jul 15, 2012, 8:21:11 PM7/15/12
to plataformate...@googlegroups.com
You'd have to use a mix of the block input and input_field, something like:

    f.input :foo do
      f.input_field :foo
      link_to "blah", "/fuckyeah"
    end

Look at the wrapping rails form helpers section [1] in SimpleForm's readme for a different example. More info for input_field can be found in the rdocs [2].


-- 
At.
Carlos Antonio

Reply all
Reply to author
Forward
0 new messages