Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add data-tooltip to simple form syntax?

this is one of the things I normally spend many hours trying many combinations, but today did not work.

I want to add Foundations data tooltip to a simple_form input, and I can't match the correct syntax.

Without simpleform:

data-tooltip class="has-tip" title="Borrar este spot definitivamente"

With simpleform:

:html => {:"data-tooltip" => 'class="has-tip"' 'title="Borrar este spot definitivamente"'}

Thanks

like image 206
Gibson Avatar asked Jan 10 '23 07:01

Gibson


1 Answers

Try this

<%= f.input :field_name, input_html: { "data-tooltip" => true, :class => "has-tip", :title => "Bla bla bla" } %>
like image 55
Monideep Avatar answered Jan 17 '23 09:01

Monideep