Displaying 20 results from an estimated 5000 matches similar to: "newbie, reciving a hash from the view"
2006 May 09
6
Create checkboxes on page using contents of a hash
Hi all,
I have a hash that is created in the index method of my controller.
After it is created, the index.rhtml page is rendered. Upon this
rendering I would like to create a check box for each key/value in the
hash.
The has is @recordsHash
I have been trying varying stratagies like the one below, but to no
avail. Do you have any ideas? Thanks for your help on this!
html
2003 Sep 11
3
PROBLEM RECIVING CALLS AT FXO
Hi...
I have the next problem.. I have a FXO card with i can make calls but i cant
recive calls.
At the consol, i get the next error:
-- Zap/2-1 is ringing
-- Zap/2-1 is ringing
-- Zap/2-1 answered Zap/1-1
-- Attempting native bridge of Zap/1-1 and Zap/2-1
WARNING[262160]: File chan_zap.c, Line 2857 (zt_handle_event): Ring/Off-hook
in strange state 6 on channel
2004 Jun 18
0
Problems reciving fax with Asterisk
Hi,
I am trying to recice a fax with * using SpanDSP - but it doesn't create the output file. (See the bottom of log file).
* Loads both app_rxfax.so and app_txfax.so fine.
Also I can't make * autodetect an incomming fax call (yes I have enabled faxdetect=both in zapata.conf - though it's not a Zap device)
Any ideas are welcome :-)
Best Regards
Michael L?jtnant
System Details:
2007 Apr 16
6
How to use a form.check_box ?
Hey guys,
I''m trying to have a simple webform in my administration section to
add a user. I have the text_fields for adding the user''s name,
password, and password confirmation, but cannot seem to figure out the
checkbox. I want it to be a single checkbox, that if clicked, will set
the database column "access" to be "admin" and if its unchecked, set
it to be
2006 Apr 04
6
check_box_tag is limited?
Hello all.
Am I going totally nuts here and just want to check (Natch!) something.
A normal check_box has two value posssibilities. One for checked and one
for unchecked, the value gets submitted with a form.
The check_box_tag on the other hand, has a checked_value (Called just
''value'') and for the unchecked value...nothing, zip, nada.
This means that if you submit a form with
2006 Jul 19
6
Howto: Check_box with a variable (no model)
Hi,
I would like to put a checkbox on a form where the input field is a
variable rather than a field in a model.
The normal way (with a model) would be:
<%= check_box(''client'', ''accept'', {}, "1", "0") %>
But since accept is a variable @accept and model client will not be
there, how do I make a check box work?
Regards,
Paul
2006 Apr 18
2
check_box
I''ve got a question on the use of check_box.
***
This is working but there just has to be a better way:
RHTML:
<% for book in @books do %>
<tr>
<td><%=book.label%></td>
<td>
<%checked = book.subscribed ? ''checked'': ''nope''%>
<%=check_box("book" + book.id.to_s,
2006 Oct 15
2
Getting check_box to default to checked?
I''ve tried this (in a new method/template -- so @type doesn''t actually
exist yet):
check_box ''type'', ''notify_on_create'', {:checked=>''true''}
But :checked seems to get swallowed. I''ve also tried setting
notify_on_create to true in the Type model, but that doesn''t work
either. Any way to get the
2006 Jun 07
5
check_box:how to update 2 checkboxes dependent on each other
I''ve got the following problem,
I''ve created two check_boxes in my view. The user has to select one
check_box,
but isn''t allowed to seth both of them together on true. Now i am
looking for functionality that can help me doing the folling:
Scenario 1
CheckBox1 = True, The user sets CheckBox2 from False to True, now
CheckBox1 should automatically become False.
2010 Nov 11
2
Rails 3 - Nested Forms, using Builder -- Check_box issue
Hello, I have the following:
My Controller:
def new
.
.
@teammembers.each do |teammember|
request = @request_thread.requests.build(:recipient_id =>
teammember.user_id, :full_name => ''Billy Bob T'')
end
My View:
.
.
<%= f.fields_for :requests do |builder| %>
<div class="field">
<%= builder.label
2009 Mar 19
1
form_tag params hash doesn't contain form data
Hi,
I have a check box in a non - model based form and when I submit
the form with ''Un Checked'' check box the params hash doesn''t contain
the check box. Whenever I submit the form with the check box
''Checked'', I see the same coming through params hash in my controller.
Since I dynamically generate the form element (Here, check box), if I
2006 Apr 25
3
Simple Rails Question
Hi, I have a few simple rails questions:
Does the check_box_tag map to an int or to a boolean field within the
database?
Thanks in advance,
-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/4956dc68/attachment.html
2006 May 02
10
Ruby on Rails w/Dreamhost - routes problem...I think.
I am trying to deploy my first app on Dreamhost using Ruby on Rails. I
followed the wiki, but I think I am missing something. I think it may
be in my RoR code, but I am not sure.
My app runs fine when run as
http://localhost:3000/AddPatientVisit/addvisits
AddPatientVisit is the controller and addvisits is the form that posts
back to the controller.
I got rid of the index.html in public
2006 Jul 03
9
checkboxes
in the mean time i am using a checkbox like this :
<input type="checkbox" name="var[car]" <%= var.car ? ''checked'' : ''''
unless @var == nil %> />
but i am sure there is something better than this in rails like
<%= checkbox_tag ''var'', ''car'', :checked => true %>
but this is not
2006 Jun 09
2
edit- view duality
Skipped content of type multipart/alternative-------------- next part --------------
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
Bear Stearns does not provide tax,
2007 Sep 15
3
check_box_tag always checked
#check_box and #check_box_tag are going to be the end of me. Why is
this always checked?
<% checked = @reservation.selected ? ''checked'' : nil %>
<td><%= check_box_tag("reservation[" + @reservation.id.to_s +
"][selected]", ''checked'', :checked => checked) %></td>
2007 Mar 30
10
check_box_tag not passing 0 when unchecked?
Code:
<%= check_box_tag("person[#{person.id}][is_approved]", 1, true) %>
Rendered output:
<input checked="checked" id="person[7][is_approved]"
name="person[7][is_approved]" value="1" type="checkbox">
Problem:
The value of "1" is always passed, even if the box is UNCHECKED.
Suggestions? Thanks!
--
Posted via
2006 May 03
2
disabled check_box does not work as expected?
I have a checkbox:
<%= check_box(:day, :monday, {:disabled => ''''} , (day.monday == true ?
{:checked => ''checked''} : {:checked => false} )) %>
It is disabled allright, but it is always uncecked. Is this supposed to
happen. It looks like
(day.monday == true ? {:checked => ''checked''} : {:checked => false} )
is not
2009 Oct 06
1
Problems Processing multiple form elements generated by javascript actions
Hi all,
After many days of struggling, I have a multi-model form with ajax
elements more or less working, but I''m hitting a wall with a few bugs
that I can''t figure out. Guidance would be very much appreciated.
I''m using the Ryan Bates technique from Advanced Rails recipes to
dynamically add and remove elements on a multi-model form.
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class
attribute and array:
(field_helpers -
[:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each
do |selector|
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to