I have simple_form for forms in my app and Ive been using horizontal wrapper as I want the label and input to be on the same level. ie:
<%= simple_form_for @task, html: {class: 'form-horizontal'}, wrapper: :horizontal_input_group do |f| %>
<%= simple_form_for @user, html: {class: 'form-horizontal'}, wrapper: :horizontal_input_group do |f| %>
NOW, I HAVE ENCOUNTERED THIS ERROR IN THIS SIMPLE FORM FOR:
<%= simple_form_for ([@task, Response.new]), html: {class: 'form-horizontal'}, wrapper: :horizontal_input_group do |f| %>
The error is:
html.erb:37: syntax error, unexpected keyword_do, expecting keyword_end
er: :horizontal_input_group do |f| @output_buffer.safe_appe...
The expecting key word end does not make sense cause i have <% end %> at the end of this simple_form. If I remove this line:
, wrapper: :horizontal_input_group
...it will work.... but I need it as I want my label and input to be on the same line. It is just strange that it works on my other simple_form for. Only in this form is not working when I add this code:
, html: {class: 'form-horizontal'}, wrapper: :horizontal_input_group
Can someone please help me/explain it to me why is this happening.