Displaying 20 results from an estimated 300 matches similar to: "CheckBox with Value and Drop down menu"
2006 May 31
5
Help with sorting arrays with objects in it
I have to build an array through both activerecord and also through a ferret
index.
I was hoping to find a way of sorting the array as i combine the two so
def advanced_search(search_text, store, format, sortby)
# find items in ferret index
items = Item.find_by_contents(search_text)
# and now find all the items from a certain store or category
items_from_sql = Item.find_by_sql("SELECT *
2006 Jan 21
1
text_area content with text_area and not text_area_tag ?
Hello,
Is it possible to fill the textarea content when using the text_area
function ?
Why there is 2 , + or - similar class : FormHelper and FormTagHelper ?
2005 Nov 22
3
Idiom for submit button?
What is the rails idiom for submit buttons on forms?
All other field types have helpers, but button_to creates its
own form, so should not be used. I''ve looked in "Agile Web Dev. with
Rails" but can''t see what I should do instead.
Is this "difficult" because it runs counter to AJAX type forms?
And, related, is there a way to ensure that hitting return in
2006 Apr 05
1
FormTagHelper form names: possible?
Thank you to everybody that has helped me since I signed up. I''m flying
along thanks to you.
I have a question about the FormTagHelper "start_form_tag": I''ve been
trying to figure out how to get Rails to output a "name" attribute for
my form so I can hook in a Javascript to focus on a field inside of it
on load, but it doesn''t look like I can do
2008 May 30
1
Parameters for FormOptionsHelper select vs. FormTagHelper select_tag
I must be missing something when it comes to the parameter differences
between form FormOptionsHelper select and FormTagHelper select_tag.
Code that follows, works perfectly -
<%= f.select :unit, units_to_select(@product), :size=>"20"%>
The following code, does not. The helper function never even seems to
be called.
<%= select_tag "unit",
2006 Feb 13
2
how to find the helpers code ?
Hello,
i have the application set up on my radrails. I was looking at the view
generated by scaffold and i see a bunch of names, after looking up
internet i found that they are helpers and generate the HTML for us.
Now, i wanted to look at the helper code for start_form_tag, so that
based on that i could write some of my own helpers in my helper
classes... but i could not find the code
2004 Aug 10
1
[OT]Google and the Asterisk list
Since I joined the list in 2003, there has been an order of magnitude
increase in functionality in Asterisk. Kudos to Mark and the developers.
I'm finding that when I Google the list, posts that are more than a few
months old are no longer relevant to me. Without using the Google API,
is there a way to have Google sort responses in date order?
Or, would there be a way to maintain a
2008 Dec 16
5
More than one submit_tag in a single form
Hai everyone ,
I have a list of users(each user in a row)and an Approve button for each
user. I wish to change the status of the user to be approved when I
click on the Approve button of a user. When I tried getting all the
users in the params hash. I want to get the id of the user according to
which "Approve" button I clicked. How can I implement this one?
Thanks in advance.
--
Posted
2010 Feb 14
2
paperclip is making me crazy
seems pretty simple, my model...
has_attached_file :pic_1, :styles => { :thumb => "120x90" },
:url => "/:attachment/:id_:style.:extension",
:path => ":rails_root/public/system/:attachment/:id_:style.:extension"
my view...
<% form_tag(:action => ''create'', :html => { :multipart => true }) do -%>
<label
2012 Apr 18
2
RoR - Search Forms with Checkboxes, display appropriate results
I have a form that allows me to search a hotel by city or name and by
rating through radio buttons. It all works.
However, my hotel model has_one :facility, this facility model is
composed by several boolean fields (for example, roomservice:boolean
restaurant:boolean and so on)
The question is, I want to add checkbox fields for each facility I have
and in the search form, when the user selects
2006 Feb 27
2
submit_tag
How can i use the submit_tag method (from: actionView::FormTagHelper)
to create various submit buttons and chose the right action in accord to
the button that i pushed?
--
Posted via http://www.ruby-forum.com/.
2008 Jun 15
2
Add a class attribut into a form_tag
Hi, do you know how to add into this balise a class attribut:
<% form_tag :action => ''search'' do -%>
in order to do this in HTML:
<form action="/people/search" method="post" class="foo">
I had try to use the official documentation
(http://api.rubyonrails.com/classes/ActionView/Helpers/FormTagHelper.html#M001036)
but that
2007 Jan 28
3
end_form_tag not generating </form>
I put the following code at the end of my index.rhtml:
<%= form_tag :action => ''reverse'' %>
<%= end_form_tag %>
and I get the following code generated:
<form method="post" action="/chapter3/reverse"/>
</body>
... no </form> tag
I''ve checked in ActionView::Helpers::FormTagHelper and the
2006 Jul 12
5
start_form_tag n00b question
Hi,
I''m wondering if there is any way to specify the id of a form tag with the
start_form_tag helper. I''ve tried playing around with ", id=>"marginForm" "
and also inclosing both the action variable and id variable in curley
brackets. The Rails API doesn''t off much help for a n00b like me. It''s
probably really easy but any help you guys
2006 Jan 19
5
TIP: Using field_error_proc to add style attributes to form elements
I just put this up on the wiki, and thought I''d share in case it''s
useful to anyone else. This is handy if you don?t want to wrap your
input elements inside a div when an error occurs, but instead want to
add some sort of CSS style to fields with errors:
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
msg = instance.error_message
error_style =
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 Aug 15
1
Question on start_form_tag and get post method
Hi all,
I have a simple question about start_form_tag. It default generates
method=post. I was wondering how you could use start_form_tag to generate
method=get. Probably a simple question but one I can''t answer with the API
doc.
Thanks in advance,
Onno
2006 Jul 20
4
drop down list
hello friends ,
can u pls tel me how to add drop down list in railsapplication
--
Posted via http://www.ruby-forum.com/.
2006 May 19
1
How to upload text files or csv files in ruby??
Hi,
I want to upload text file & csv file to server through my rails
application. How to do that?
PLease tell me if any plugin available for that? If not then how to
upload files??
Thanx in advance.
Prash
--
Posted via http://www.ruby-forum.com/.
2006 May 23
1
Form Field Helpers... Do they need objects?
I''m trying to use the select helper but do not need to pass the values
back to an object because this is just used as a param value. Everywhere
I''ve looked I see that the form field helpers require an object name.
I''ve tried omitting the name but I get an error telling me I have two
few paramaters. (2 out of 3)
Other than typing out the HTML myself (because the