Displaying 20 results from an estimated 2000 matches similar to: "Radio Button Validation"
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
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 15
8
Tags to ruby interface: What I am missing? (repost)
I offer my apologies in advance for the repost. On a list as busy as
this, it is sometimes easy to get missed in the shuffle.
I am trying to create, display and edit a referenced object''s text field
on the same view as my root object.
For example:
-------------------------
Quiz: <<quiz.name>>
Preamble: <<quiz.preamble_presentation.text>>
Postamble:
2008 Jul 21
0
edit radio button values...
my problem is... during edit process radio button should be checked as
default ..how can i do that ..pl help..
my edit .erb file
<% form_tag (:action => ''update'', :id => @mobile )do%>
<p><label for="book_title">Title</label>:
<%= radio_button ''mobile'', ''brand'', ''yes'' :checked =>
2006 Jun 28
3
observe_field and radio button... does not work?
I try to catch click event on radio button, but nothing is executed....
Tested with RoR 1.1.2 and 1.1.3. What am I doing wrong?
<%= radio_button_tag(:city, ''Dublin'') %>
<%= observe_field(:citi, :frequency => 0.5,
:on => ''click'',
:with => "''city='' +
2006 Apr 02
2
"Quiz" site
Hi,
I am thinking about how to best design a quiz site in RoR. I think it
should be fairly easy, but have run into a wall. In the simplest form,
the view would grab all of the questions for a particular quiz and
display them (e.g. multiple choice, so 4 option buttons per question).
However, I can''t figure out how to "mark" the quiz. The form is
submitted to the
2006 Mar 12
2
Ruby syntax question, I think ...
I am successfully navigating between controllers. However, I am unable
to construct a new child (question) record.
What does "undefined method `stringify_keys!'' really mean"?
I think I am missing a subtlety of Ruby syntax here, since the
question_controller is actually trying to call the Question constructor.
Can someone point out what I am missing please?
Thanks in
2006 Aug 10
7
Radio Button events
Hi,
I have observers for a group of radio buttons, an observe_field for each
radio button (I think its not possible to have one observe_field for a
group of radio buttons).
Now, the problem is that when I click on one radio button, all the
observers get trigerred, so the method which the observe_field calls
gets the wrong result. I just want that method to get the radio button
that is
2006 Apr 16
5
Granular model validation based around controller actions?
How can I achieve granular control over the validation for different
controllers? I create users from an administration controller, but I
don''t want to fill in all their information fields, just have their name
and email address. When they accept the invitation, I want to implement
validation on the other fields.
I have looked at using :on => :update, but I would have to make the
2006 Mar 09
2
Newbie question: How to represent parent-child denormalization
I am building a relatively trivial application to try to learn my way
around Rails. I am having difficulty understanding how to navigate a
heavily denormalized hierarchy. Could someone direct me to a bare-bones
explanation of using rails to navigate database hierarchies?
I am an experienced developer. Most of my work has been desktop client
server, high performance, or server to server
2006 Mar 14
1
I''m missing something obvious to a taglib programmer ...
I am trying to create, display and edit a referenced object''s text field
on the same view as my root object. I have just about come to the
conclusion that whoever invented of taglibs should be shot.
quiz.preamble_presentation references a Presentation object instance.
The Presentation object contains a property called text, among others.
The generated form will display the ID of the
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,
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
2006 Apr 01
12
Repost: Why is rails generating bad SQL?
It looks like I am missing something obvious. ActiveRecord is
generating _really_ bad SQL for this configuration, and I can''t quite
figure it out.
I''ve instrumented ActiveRecord enough to localize the problem somewhat,
and generally by this time I would have a good idea of what I was
missing because it''s all in the source.
It appears that something in
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
=
2007 Sep 14
2
how to use options in radio botton
Hi I am using radio botton,I am struggling to use options..following is
my code..
<%=
radio_button(''community'',''default'',0,options={:checked,:onClick=>"javascript:set_default(this);"})%>
If i am using without checked option its working fine.If i use that its
throwing error....
Please help me
--
Posted via http://www.ruby-forum.com/.
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:
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
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
2004 Jan 12
2
A question on codec translation.
Here is the scenario...
SIP UA's can use either GSM or G.711 ( in that order of preference in
the sip.conf )..
Asterisk Server1 is linked to Asterisk Server2 via IAX2 and also
supports GSM and G.711 ( also in that order of preference)..
1. If a call comes in from the UA using GSM and then goes out over the
IAX2 leg, Will Asterisk simply move the GSM encoded data from the SIP
channel to