werein / x-editable-rails

Edit fields easily with X-Editable helper
https://wereinhq.com/guides/x-editable-rails
MIT License
155 stars 87 forks source link

placeholder not working #81

Open krtschmr opened 8 years ago

krtschmr commented 8 years ago

=editable current_pack, :description , url: users_mod_pack_path(current_pack), placeholder: "Click to edit a description"

i would expect to read that text, instead it comes "Empty"

MartinElvar commented 7 years ago

I know that this is a bit late, but placeholder is the value used for input field itself. So after clicking.

You can still use the original options, take a look here http://vitalets.github.io/x-editable/docs.html#editable.

Hence. <td><%= editable customer, :name, url: customer_path(customer), value: customer.name, emptytext: 'my default text' %></td> Should work just fine. :)