adding an additional label or text after the input field

29 views
Skip to first unread message

John Davalos

unread,
Oct 31, 2014, 5:13:23 PM10/31/14
to plataformate...@googlegroups.com
Hey Guys, 

I wondering if you can point me in the right direction. What i'm looking to do is add some extra text after my input field, but reading through the docs i'm not sure if there's a preferred method to do this. 

my form looks like this

[ label ]
[ input ]  [ extra text i'm trying to figure out how to add ]

I'm trying to create a custom input class based off of this https://github.com/plataformatec/simple_form/tree/v2.1#custom-inputs but as i render the page i keep getting a ArgumentError from a custom form builder we've created that simply sets labels then we call

 super(attribute_name, options, &block)

it's on this call that i get a wrong number of arguments error when i clearly have the correct number of arguments, or at least i think i do. 

In my custom in put i have one method

def input(wrapper_options)
    "$ #{@builder.text_field(attribute_name, input_html_options)}".html_safe
  end

any help, or link to helpful information would be appreciated. perhaps i'm making this harder than it needs to be?


thanks,
john

John Davalos

unread,
Oct 31, 2014, 5:18:07 PM10/31/14
to plataformate...@googlegroups.com
forgot to add my code from the form.

t.input :increase_rate, as: :custom_input

i'm using haml too
Reply all
Reply to author
Forward
0 new messages