Displaying 20 results from an estimated 10000 matches similar to: "edit radio button values..."
2009 Apr 28
0
Radio buttons in forms
<% form_for @group do |g| %>
To create a new group please complete the details below
<p>
<label> Group Name </label>
<%= g.text_field :name %>
</p>
<p>
<label> Public </label>
<%= g.radio_button :type, "public" %>
<label> Private </label>
<%=
2013 Jun 18
1
How to Pass Jquery selected dropdown values and radio button values to controller
Hi,
I have an advance search page and its code is as follows -
I have written my code like this
<div class="container">
<%= form_tag search_index_path, method: :get do %>
<%= radio_button_tag ''user_type'', ''customer'' %><p>Customer</p>
<%= radio_button_tag ''user_type'',
2007 Aug 04
0
capturing radio button values for nested object
I have a user object and an account object. User has one account
object. In the signup.rhtml I have a radio button that has three
options for the membership (yearly, monthly and sample). How do I
populate the account model when the user submits the form?
Is the following syntax correct?
<%= radio_button("user[account]", "membership", "Yearly") %>
2006 Mar 22
2
Radio Button Defailt Value?
I have:
<%= radio_button ''foo'', ''bar_id'', ''1'' %>
<%= radio_button ''foo'', ''bar_id'', ''2'' %>
<%= radio_button ''foo'', ''bar_id'', ''3'' %>
I would like to have option #3 be selected if foo.bar_id is nil. Is
there a way to do
2011 Nov 20
3
Use Ransack with radio buttons for boolean values
Hello
I''m trying to search for active and non active users. These radio buttons
work just fine except that it didn''t reselect itself after the form has
been submitted. So, what should I do to ensure it will be selected just
like how my text field populated automatically after the form has been
submitted?
= search_form_for @q do |f|
= f.radio_button :is_active_false, 1
=
2008 Mar 23
1
radio buttons - how to identify record using value?
I''m making a simple questionnaire app using RoR. I''ve got a model for
Questions, a model for Answers, and a third model, Qa, for matching each
question to five possible answers through foreign keys. So, each qa has
a question and five answers , a1-a5, through belongs_to and a
:foreign_key, and then a selected_answer field for specifying which
answer was selected by the user. The
2007 Jan 31
0
radio buttons => What if the value is a FK?
Hi:
I have radio buttons like this in my view:
<%= radio_button :goals, :goaltype_id, ''Recurring'', { :onclick => "new
Effect.SlideDown(''recurring''); return false;" }
%> Recurring<br />
<%= radio_button :goals, :goaltype_id, ''One-time'', { :onclick => "new
2006 Mar 10
0
Multiple radio buttons for defining multiple objects?
Hi, I''ve been working on a multiple choice Question/Answer system. The
response object (analagous to a lineitem) has a question_id, user_id,
and the actual response. What''s a good way of making a form with
multiple response objects which are created from the radio_button
helper?
Right now I''ve got the following code:
2006 Aug 10
3
Radio buttons refusing to load checked...
Hi,
Having big problems with radio buttons that just don''t make sense:
<%= radio_button "events", "impact_type", true %> Positive
<%= radio_button "events", "impact_type", false %> Negative
This should create two radio buttons with the first one checked by
default, right? Cos it doesn''t :(
Any ideas would be great,
Thanks,
2009 Apr 12
3
Multi-button form
It cannot be this difficult, especially in rails. Here is my form code
in a partial for the index action of a controller:
<% form_tag({:controller => controller_name, :action => ''index''},
{:method => :get, :class => ''form''}) do %>
<div class="columns">
<div class="column left">
<p>
2006 Mar 17
5
Radio Button Validation
I''m writing a quiz application and I need to validate the radio button
reponses. I do not have the questions in a database, I just have forms
which contain "question1" and then I strip out the "question" portion
and just insert the number as the question''s id. So now I''m faced with
the dilemma of making sure the radio buttons are pressed.
Radio
2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all,
How can i use form_remote_tag inside the form_tag helper .
My application has following view subscribe.html.haml
- form_tag :action => :subscribe do
/other form element
%input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"}
%input{:type=>''radio'',
2007 Feb 27
2
Dynamically add radio buttons to forms?
Good afternoon all
I''m trying to implement a form that dynamically inserts radio buttons
into a form. The user selects options from a drop-down menu. I use
observe_field to watch for a change and call back to render the
appropriate partial tha contains the radio options. All works nicely
but I''m tripped up on one thing:
When rendering a form using form_for how do I link those
2006 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a
couple days and can''t seem to figure out the correct way to structure my
observe_field call. The HTML and Javascript generated all appear
correct, but the AJAX call is never made. Below is the code I''m using
and any help would be much appreciated.
models_controller.rb
def
2011 May 05
1
Array params in form_tag
Hello i have a lot of time trying to figure this out.
I am having problem sending array params with form_tag :remote=>true
form.erb
<%#= form_tag reporte_client_reports_path do%>
<%= form_tag reporte_client_reports_path,:remote=>true do%>
<p>
<%= label_tag :cuts %>
<%= select_tag "cuts[]", options_from_collection_for_select(@cuts,
2006 Mar 24
1
Radio Button Tag and hash @Params.
Hi,
I''ve a little problem using the Radio Button Tag.
I use the " @prove=MODEL.column_names() " to keep attribute names of a
table. After
i used this code to select a attribute subsets of them :
<% i=''0''%>
<% for @obj in @prove %>
<% @key='':key''+i%>
<%= radio_button_tag (@key,@obj) %>
<%
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
I am trying to rewrite my website in Rails 3 and Ruby 1.9.2.
Can some one help me convert my observe_field which is working under
Rails 2.3.5 to Rails 3. I would like to avoid using JQuery as over the
last year everything I have tried in JQuery has failed, including this
one. Perhaps due to my lack of knowledge. I would not like to install
the legacy upgrade.
What I have in my website is several
2011 Feb 18
1
why 'Template missing' error with form_tag?
ROR newbie here...
I''m trying to build a form to upload a CSV file, then parse and store the
data. I have debugged this code up this point, but now when I browse to my
csv file, and click Upload, I get this error:
"Missing template uploads/process_file.html.erb in view path..."
Here is my view (in /uploads/new.html.erb)
<% form_tag ({:action =>
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
I have a form_tag written like this :
= form_tag search_backoffice_places_path, {:remote =>"true", :id =>
:searchplaceForm } do
.. input fields
= submit_tag t(:search)
generated html is correct :
<form accept-charset="UTF-8" action="/en/backoffice/places/search"
data-remote="true" id="searchplaceForm" method="post">
...
2006 Apr 04
1
using form_remote_tag and radio_button
I want the user to select a date using radio buttons. The following
code shows the last 7 days.
<%= form_remote_tag(:update => ''register_order'',
:url => { :action => :register_orders } ) %>
<% 1.upto(7) do |i| %>
<%= radio_button "date", "register_date", i.days.ago.strftime("%Y-%m-%d") %>