similar to: How do you deal with non-model property form values

Displaying 20 results from an estimated 1000 matches similar to: "How do you deal with non-model property form values"

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 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
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>
2006 Aug 10
2
check_box form helper questions/issues
I''m using Rails 1.1.x and it looks like the check_box form helper expects me to provide and object and method so it can determine if the checkbox should be checked or not. I''m having a couple of issues with this. note: I''m using UserEngine and adding a HABTM so that: class User < ActiveRecord::Base has_and_belongs_to_many :foos end class foo <
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
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
2008 May 29
5
f.checkbox?
Okay so I have a typical search page where a keyword is entered and results are retrieved that match the keyword. What I want to do now is have checkboxes to search for results in specific areas (my site is a big events calendar with "streams" and "audiences") I want to use the checkboxes to look for results in ''streams'', ''audiences'', or
2006 Jul 19
3
How do I check the retuned value from check_box_tag?
Hi, I have this in my form <%= check_box_tag(@accept, value = "1", checked = false) %> Which puts a nice checkbox on my form but when I try to retrieve the value that is returned, which I expect to find in @accept, there is nothing. How do I check the returned value? Thanks, Paul Thompson
2008 Jun 18
2
check_box_tag with instance variable
hi, i am trying to use one check_box with instance variable and trying to get true or false value from database table. and also please give me solution for multiple check_box and select all how to feed and retrieve value and show in check box. Thanks Purab -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
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 May 03
1
Differences betwen check_box_tag and check_box form helper.
What is the difference between the check_box_tag and the check_box form helper? I can''t understand why both must exist. :( Thanks. Fernando Lujan
2006 Jul 11
4
checkboxes with a has_many :through relation
All, I''m populating a view with checkboxes in a list. I want to be able to assign to my has_many relationship using the post values of these checkboxes. Essentially, I want to populate the relationship table which will create the correct join values in my model. Here is my check_box_tag code: <%= check_box_tag("@current_job[target_list_ids][]",
2006 May 11
3
multiple checkbox values, convert to string, 1 db field
Basically what I''m trying to do is create a way for users to enter "keywords" that will then be searchable. I.e., when a user creates a new Item, there is also a keywords field in the database that is a string like "purple triangle free" -- but all the user sees when they are creating the keywords is a series of checkboxes like: __blue __red __purple __circle
2012 Jun 26
4
ActionView::Template::Error (undefined method `strftime' for nil:NilClass)
Hello, I''m a newbie. I need help resolving this issue. I recently added a pdf to the newsletter admin section of the website and now I can no longer view page 2 of the list of pdf''s. Nor can I login to see the newsletters as a student. I''m using Ruby 1.9.3, Rails 3.2.1. Here''s the information from the log file. ActionView::Template::Error (undefined
2012 Jun 25
1
ActionView::Template::Error (undefined method `strftime' for nil:NilClass):
Hello, I''m a newbie. I need help resolving this issue. I recently added a pdf to the newsletter admin section of the website and now I can no longer view page 2 of the list of pdf''s. Nor can I login to see the newsletters as a student. I''m using Ruby 1.9.3, Rails 3.2.1. Here''s the information from the log file. ActionView::Template::Error (undefined
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 19
2
OT :JavascriptSortableTables
I found this on the rails wiki http://www.kryogenix.org/code/browser/sorttable/ Looked farily easy, class and id for the table. Dropped the JS in to application.js. Problem is it''s putting the sort link on the first row of data and not on <thead> Anyone know how to fix it ? Here''s a bit of my table: <table class="sortable" id="poso">
2007 Sep 23
1
Selecting Links with their parent class attribute?
Hi all, Trying to figure out a quick way to do something. I have a yahoo groups list, and it has listings that look like this: </td></tr> <tr><td colspan="2" class="ygrp-g"> <span class="ygrp-nowrap"> <em><a href="/group/freecycledc/">freecycledc</a></em> </span> <a
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
2012 Nov 16
1
[LLVMdev] ScalarEvolution, HowManyLessThans question for step > 1
Hi, I have a question about some code in ScalarEvolution.cpp, in the function HowManyLessThans. Specifically, this function returns CouldNotCompute if the iteration step is greater than one even when the NoWrap flags are set (if the step goes past the limit and wraps). Here's the comment: } else if (isKnownPositive(Step)) { // Test whether a positive iteration can step