0

If I need to add something into link_to helper, there's a way to do that this way:

= link_to path do
 inner content

But this approach doesn't work for f.submit helper. I would need to add there some HTML entities. How to do that?

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367
user984621
  • 46,344
  • 73
  • 224
  • 412

1 Answers1

4

I'm afraid you can't. <input type="submit" /> is a button, as specified here: http://www.w3.org/wiki/HTML/Elements/input/submit. HTML buttons can't display arbitrary content.

Instead you could build a link tag (or whatever tag you want) and then attach a click handler to it which will submit the form with javascript.

Related link: Submit a form with jQuery.

Community
  • 1
  • 1
Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367