# app/inputs/my_special_string_input.rb # use with :as => :my_special_string class EpicEditorInput < Formtastic::Inputs::TextInput def input_html_options { :class => "epiceditor" }.merge(super) end def to_html input_wrapping do label_html << "
".html_safe << builder.hidden_field(method, input_html_options) << buildInitScript(input_html_options[:id]) end end private def buildInitScript(id) randNum = rand(1..100000) return """ """.html_safe end end