simple-form Questions
2
Solved
I have a form that displays a set of inputs. I also have a button, and when clicked, I make an ajax request which is supposed to replace the existing inputs with a different set of inputs.
All my...
Agility asked 8/6, 2012 at 3:2
5
Solved
I want to use placeholders everywhere in my application instead of labels. I am using simple_form and Rails (3.2.14). How can I specify in simple_form config file to use placeholders instead of lab...
Connell asked 6/8, 2013 at 10:3
6
How I can add checkbox with simple_form without association with model?
I want to create checkbox which will handle some javascript events, but don't know?
Maybe I miss something in documentation?
...
Derinna asked 7/2, 2012 at 19:18
6
Solved
I am using the ruby gem simple_form for different forms around my site and was wondering if there was a way to combine/collapse the date input that is rendered by default:
= f.input :dob, label: "...
Marney asked 7/11, 2013 at 11:45
2
Solved
I am editing a resource - @article - and whenever I submit it I get the following error:
JSON::ParserError in ArticlesController#update
783: unexpected token at '#<ImageUploader::UploadedFile:0...
Fungi asked 4/5, 2020 at 7:21
6
Solved
im trying to do default value for input
works ok:
<%= f.input_field :quantity, default: '1' %>
but i need f.input not f.input_field
<%= f.input :quantity %>
im trying it wit...
Tourney asked 26/9, 2013 at 13:4
5
= r.input :date_start do
= r.text_field :date_start, id: 'date_start'
How can I set default value for this?
Retrogression asked 9/7, 2015 at 6:26
5
Solved
I need to add a custom HTML attribute to each option for a select control. I'm using simple_form in Rails. Does anyone know how to do this? The attribute will be consumed by client-side JS.
For in...
Anglicize asked 9/7, 2013 at 17:40
2
Solved
I have a select field and I want to put a custom attribute at it called name, I tried to do it like that:
<%= f.association :in_charge, :collection => User.lawyer.map{ |l| [l.name, l.id, {:...
Cami asked 11/6, 2012 at 3:46
6
using simple_form we can change class of a label using:
label_html => {:class => "myclass"}
but how do we do the same when dealing with checkboxes?
simple_form assigns the default class of...
Liv asked 28/4, 2011 at 0:38
4
Solved
In many of my projects I use simple_form and love it.
However one really strange quirk that I find is that I get 3 small dots underneath the * it supplies for required fields.
I have to get around...
Nihility asked 19/7, 2011 at 14:4
5
In order to get the styling I want on Chrome in OS X, I have to use the -webkit-appearance: none; attribute.
See this question and this answer.
The issue is, now when I select an answer, it doesn...
Deadeye asked 19/5, 2013 at 5:41
2
Solved
i'm using the simple_form gem and really like its simplicity. However, trying to set to set up a simple radio button is beyond me as I keep getting the following error
"undefined local variable or...
Condensed asked 18/2, 2014 at 13:44
2
Solved
I want to build a select input from an array (and not a collection of models), with SimpleForm, and have different classes for each options.
I would have hoped that this would work:
f.input :meth...
Eliza asked 3/3, 2013 at 21:15
4
I'm using Rails 4 and Simple Form with Bootstrap.
I want that my checkbox will not like that:
<%= c.input :my_bool_field, label: false, class: "form-control" %>
but something like that ...
Dharma asked 20/9, 2016 at 12:34
2
Solved
I've a form in a basic task management app which allows Tasks to be assigned to Users (task belongs_to user). I'm using Simple Form for this.
Currently, the association is populated in the typical...
Smearcase asked 21/4, 2015 at 17:19
11
Solved
When I add the 'Required' attribute
to html input fields, Rails pre-pends an asterisk (*) before the label.
Does anyone know how to prevent this?
For some reason Rails transforms this:
<%= f...
Val asked 4/10, 2011 at 15:56
3
Solved
I'm using garlic.js to validate my forms. Garlic.js recommends adding a data-attribute on the form tag.
Here's what I need to generate:
<form data-validate="parsley">
I'm having issues to...
Karolyn asked 13/5, 2013 at 20:59
2
Solved
How change default id or class, which produce simple form:
= simple_form_for(@account, url: account_url, validate: true, wrapper: :inline, html: { method: :put }) do |f|
html:
<form accept-c...
Primogeniture asked 21/1, 2012 at 13:25
3
Solved
Putting two divs on the same line is an old question. But I can't find a solution when working with simple_form in rails. What I want to do is to display content and its label on the same line. The...
Oryx asked 1/1, 2013 at 20:13
5
Solved
I want to add a default value to a text-input field using simple-form.
With :placeholder it is not used as default....
<%= f.input :user, :placeholder => '[email protected]' %>
Varix asked 8/8, 2012 at 19:31
2
Solved
So I have a decimal field with precision 2 in the database, meant to be used for currency. It works fine unless the last decimal place ends in 0, ie. 799.90. It will instead strip it to 799.9 when ...
Metropolis asked 9/7, 2012 at 18:24
2
In the simple_form initializer there is this line
# How the label text should be generated altogether with the required text.
# config.label_text = lambda { |label, required, explicit_label| "#{...
Guria asked 14/10, 2018 at 2:50
8
I've tried
#Default size for text inputs.
config.default_input_size = 10
from config/initializers/simple_form.rb
I've also tried <%= f.input :message, :input_html => {:size => 10} ...
Vermifuge asked 25/11, 2012 at 23:5
4
Solved
I want to create a simple money input with SimpleForm.
The money field should have a minimum value of 0, so that a user cannot enter a value less than 0.
However I don't know how to define min va...
Astrology asked 21/4, 2014 at 3:51
© 2022 - 2025 — McMap. All rights reserved.