form-helpers Questions

4

Solved

I have a reservation search form that contains the following date_field helper: <%= date_field(:reservation, :arrival_date) %> How do I select a specific date for this date_field tag using...
Vouge asked 18/2, 2014 at 9:56

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

8

I have the following link_to delete url in my app <%=link_to "Delete",blog_path(@blog.id), :method => :delete, :class => "delete", :confirm => "Are you sure ?"%> It does not seem...
Waldman asked 12/12, 2010 at 18:45

2

Solved

I have have this dropdown menu where you can select multiple values. Now let's say I want to edit my info and make a dropdown menu with multiple selected values. Trying to figure out how it goes, b...
Lavonna asked 19/9, 2012 at 9:32

11

Solved

I made checkboxes using the following rails form helper: <%= check_box("tag", tag.id) %> However, I need to make some of them checked by default. The rails documentation doesn't specify ho...

5

Solved

In rails, is it recommended to use form helpers? Internally, everything boils down to plain html then why not write the html directly? Performance will obviously be better in writing direct html th...
Fives asked 10/1, 2009 at 14:12

3

Solved

I am trying to give a class to my text_field_tag I have this <%= text_field_tag :login_aei, class: 'form-control' %> but it keeps generating this : <input type="text" name="login_aei"...
Khosrow asked 31/8, 2015 at 19:12

7

Solved

How do you set a custom id when using a check_box_tag helper in rails? I have a loop which creates a bunch of checkboxes based on a collection: - subject.syllabus_references.each do |sr| = check...
Destructionist asked 2/3, 2010 at 2:6

3

Solved

<%= f.label :category %><br/> <%= check_box_tag 'category[]', '1', false %> <%= label_tag 'community', 'community', class: 'category_select', value: '1' %> <%= check_box_...
Limit asked 18/4, 2013 at 23:59

3

How can I change input wrapper div class in CakePHP 3.0.0.? My code is: <?= $this->Form->input('mobile',['div'=>['class'=>'col-md-4'],'class'=>'form-control','label'=>false])...
Lava asked 10/6, 2014 at 11:56

1

Solved

I have a Campaign model with a channel column. This channel will store a serialized array of chosen results via checkboxes. Here's the model.. app/models/campaign.rb class Campaign < ActiveRe...

3

Solved

How do I make a text field accept only numeric values? If I press a letter or a symbol, the text field should not be filled, it should only allow numbers. Is there a rails way to do this?
Thanh asked 12/12, 2011 at 21:29

3

Solved

I am new in Asp.net MVC and i researched about Ajax.BeginForm but when i apply codes it did not work. Can you share very simple example with Ajax.Beginform with View, Controller, Model? Thank...
Catamite asked 13/6, 2013 at 19:27

2

Solved

Twitter Bootstrap has this role attribute for forms: <form role="form"> How can I include the role attribute in Rails form helpers? I tried this, but it doesn't work: <%= form_for @us...
Disfigure asked 27/10, 2013 at 18:54

2

Solved

I have an edit form in erb. <%= form_for @animal do |f| %> Within the code I have a select with options: <%= f.select :gender, options_for_select([['Mare'], ['Stallion'], ['Gelding']],...
Cristicristian asked 1/10, 2013 at 15:53

1

Solved

Im trying to save multiple selected values form a multiple select field generated by the rails helper select. <div class="form-group"> <%= f.label :available_type, "Available in categor...
Endurant asked 7/1, 2014 at 9:59

2

Solved

I have a rails helper text field from devise that uses html and atomatically validates the type="email" field. I want to add the attribute novalidate='novalidate' to it, but i do not know how.. Her...
Homologize asked 15/8, 2011 at 14:9

4

Solved

When you've got a form field such as this: <%= f.text_field :last_name %> it will generate this in HTML: <input id="person_last_name" name="person[last_name]" size="30" type="text" /&g...
Divvy asked 7/2, 2011 at 13:42

1

Solved

Why simple_form generates input tags twice for boolean fields (one hidden and the other not)? In my simple_form, I have this: <%= form.input :over_phone, as: :boolean, input_html: {checked: tr...
Tautologize asked 27/9, 2013 at 11:12

2

Solved

Is it possible to provide a CSS class for the time_zone_select FormHelper in Rails 3. I currently have something like f.time_zone_select :time_zone Have tried options like - f.time_zone_se...
Registered asked 8/11, 2011 at 9:36

1

Solved

I am completely new to ruby on rails, and trying to follow the rails guide on Form Helpers. When I try using a date_field helper with: <%= date_field(:user, :born_on) %> I get an error: u...
Izanami asked 9/7, 2013 at 16:49

2

Solved

I'm trying to create a form with some custom data attributes on the inputs: <input type="text" data-family="Dinosaurs"> This seemed like a nice clean way to have easy front-end access (hah...
Sacha asked 4/3, 2011 at 23:6

1

Solved

I have a text_field_tag in my form, i really want it just for display (all my jquery updates this text field), using a date picker. Though I don't want the user to type in here, so I said the :disa...
Britneybritni asked 25/2, 2013 at 21:26

4

Solved

I need to produce a select menu with a Default value on the list of <options> . Here is how I need it looks like. <select name="menu[parent_id]" id="menu_parent_id"> <option value=...
Arratoon asked 5/5, 2010 at 9:55

2

Solved

right now I have two forms in a row <section> <%= render 'shared/micropost_form_purchase' %> <%= render 'shared/micropost_form_sale' %> </section> then for _micropost...
Frottage asked 13/9, 2012 at 22:13

© 2022 - 2024 — McMap. All rights reserved.