simple-form Questions
3
Solved
Does anybody have a nice way of adding * to required form labels, without having to turn to tools like SimpleForm?
I did not like the way SimpleForm added all these weird wrappers and classes to m...
Sedative asked 8/3, 2012 at 17:22
9
I declare a model with an enum type like:
class Event < ActiveRecord::Base
enum event_type: { "special_event" => 0,
"pto" => 1,
"hospitality" => 2,
"classroom" => 3
}
Then in...
Careful asked 14/8, 2014 at 21:4
7
I need to add a class to the input/textarea/etc when the form is rendered and that field has an error.
<input type="text" class="custom-error-class" />
Is there an easy way to append to Si...
Carruth asked 4/2, 2014 at 17:39
3
Solved
I am using simple_form in my rails application. I want to disable a particular value in drop-down.
Here is part of the code
= simple_form_for(@organization,url: admin_organization_path) do |f|
...
Osage asked 3/2, 2016 at 12:26
3
Solved
So I'm using simple_form for building my forms, this is not a requirement though.
What I am trying to do is using simple_forms collection_check_boxes and pass it an array.
I am storing my tags in...
Hankypanky asked 15/12, 2011 at 8:46
4
Solved
I am using simple_form in my Rails application, I tried to add form-horizontal class to my form.
<form accept-charset="UTF-8" action="/account/orders" class="simple_form new_order" data-validat...
Downstate asked 16/12, 2012 at 16:22
5
I want to change the default behavior of my submit button in simple_form so that I needn't explicitly specify :disable_with => true for all my forms. How can I make this particular change in the si...
Cliffhanger asked 5/7, 2012 at 8:50
3
Using the Simple Form gem and bootstrap, I'm trying to figure out a way - using Ruby - to add a tooltip next to a form label in the form of a question mark, that displays the tip on hover or click....
Cretinism asked 24/11, 2016 at 10:55
5
Solved
How can you have a hidden field with simple form?
The following code:
= simple_form_for @movie do |f|
= f.hidden :title, "some value"
= f.button :submit
results in this error:
undefined meth...
Suffolk asked 20/3, 2011 at 21:3
6
Solved
Is it possible to use Simple Form (by: Plataformatec) without a model?
https://github.com/plataformatec/simple_form
Third asked 3/3, 2011 at 13:13
9
Solved
Using simple_form_for, Bootstrap and Rails 3. In a form:
<%= f.input :upload, label: 'PDF file:' , input_html: {accept: ('application/pdf') } %>
I don't know how I'd style this so that the...
Sea asked 24/1, 2013 at 19:44
4
I have a model (FooBar) with three columns:
Foo -> String
Bar -> JSON
Baz -> String
I want to create a form for this model
Bar has default attributes of: {zing: {}, zaz: {}, laz: {}}
...
Canady asked 1/3, 2015 at 18:54
3
Solved
I have a Flight model nested inside a FlightLog model. A FlightLog may contain many flights.
I'm using SimpleForm with the bootstrap installation, which makes it possible to surround form elements...
Octosyllable asked 2/4, 2012 at 14:43
3
Solved
I am using SimpleForm to build my form.
I have say the following model:
class ScheduledContent < ActiveRecord::Base
belongs_to :parent
attr_accessible :lots, :of, :other, :fields
serialize ...
Pappose asked 12/12, 2012 at 6:4
2
Solved
I have the following code in my views
<%= f.input :role_names, as: :check_boxes, collection: @program.role_names %>
And whenever I submit the form I am getting values something like ["admin...
Saucier asked 27/12, 2012 at 11:46
3
Solved
When I do f.input :start_date, as: :date I get 3 select elements (day, month and year).
I can do f.input :start_date, as: :string to get input[type=text] element, but how can I generate input[type...
Jurist asked 16/3, 2015 at 11:11
4
I'm using simple_form with bootstrap wrappers, and can't figure out, how to do this.
I want to generate input like this:
<div class="form-group string optional event_start_time_date ">
<...
Lulita asked 18/3, 2015 at 12:26
1
I've looked at the rails casts on how to create your own generator and have read a number of stack overflow questions. Basically what I am trying to do is to build a generator like the built-in rai...
Fash asked 16/6, 2015 at 1:37
4
I am using simple_form gem with bootstrap 3.
I want to have a wrapper for submit button
Now it shows HTML as
<form id="new_order" ...>
...
<input class="btn btn-primary" type="submit"...
Particularize asked 17/12, 2014 at 21:50
2
Solved
I have albums and pictures where albums hasmany pictures
This is my routes.rb
resources :albums do
resources :photos
end
Instead of photos_path my path is album_photos_path
In my photos/new.h...
Manriquez asked 1/8, 2014 at 18:22
2
Solved
Environment
Ruby 2.5.1
Rails 5.2.1
Simple Form 4.0.1
Current behavior
I follow example in http://simple-form-bootstrap.plataformatec.com.br/examples/input_group
I start with <%= simple_for...
Leitman asked 15/9, 2018 at 7:32
8
I have a static string variable which i need to change possibly depending on the HTTP protocol.
Is it bad practice to change the static string variable>
static string QuoteWebServiceUrl = CommonF...
Pad asked 15/2, 2011 at 15:49
3
Solved
I'm making a Rails app but I'm having this issue
In my form, I'm trying to make required some fields but it is not working.
<%= f.input :name, required: true, label: false, placeholder: "Name"...
Augmented asked 4/8, 2015 at 22:19
4
I have a large simple_form form with fields that need to be enabled or disabled depending upon where the form's partial gets loaded.
My question is: how do you disable every form input quickly usin...
Xanthene asked 4/12, 2014 at 3:16
5
I've been browsing stack overflow and I noticed that many people use simple_form to make their lives easier.
I wanted to give it a try, so I added the gem to my gem file (gem 'simple_form') and se...
Abdication asked 4/4, 2012 at 23:17
1 Next >
© 2022 - 2025 — McMap. All rights reserved.