similar to: checkbox_tag outside a form?

Displaying 20 results from an estimated 11000 matches similar to: "checkbox_tag outside a form?"

2006 Jun 20
1
Soliciting suggestions - Form within a Form
Greetings! I could use some suggestions on how to proceed from where I am to where I want to go. I''m working on an app that collects info from the visitor and saves it to a file. The file can later be read in for update. To collect the info, the app presents a form with a set of checkboxes. The state of the checkboxes at initial presentation is controlled by a summary record that is
2006 Jun 27
2
Bug in Firebug or in RJS? Or something else?
I''m getting a really strange result using RJS page.replace_html and wonder if anybody knows anything that could help me figure it out. I''m rendering a partial in a loop in edit.rhtml that puts a set of <div>s on the page, each <div> containing a checkbox_tag with an associated observe_field and a text_field_tag also with an associated observe_field. When the
2007 Mar 13
7
Form with subforms
Hi, I''m looking for a way to implement subforms. For example, a form where you can add clients, and at the same time enter contactpersons for this client. I''ve been looking around, reading ebooks, etc, but can''t seem to find a good example/tutorial for something like this. So I would be very thankful if someone could point me in the right direction. Thanks, Sven
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
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Jul 20
5
Need HELP changing link_to_remote to a button
I would really appreciate some help with changing a link_to_remote call to a button of some sort. Here''s a little background. On the page there are two <div>s. One is a form that lets the visitor enter items. The second <div> is where the entered items get displayed, each in it''s own item <div>. Each item <div> has two <span>s. The first one
2006 Jun 01
7
Second Insert
I''m having a problem trying to come up with the best way to go about doing something in a Rails app. Here''s the situation: I have a form with a list of check boxes a client can choose from, but my client also wants the user to be able to submit their own item, wich will be saved in the table that populates the check boxes. Does anyone have any insight into this? Thanks a
2006 Jul 24
2
:disable_with for button_to ???
With form_tag submit buttons I use the " :disable_with => ''button label while processing'' " option so that visitors with slow connections aren''t able to submit forms twice. How do I do the same thing with button_to? I''ve got several pages where there are multiple forms on the page being updated with Ajax so I can''t wrap the whole
2011 Oct 21
20
How to transform my html form into a rails 3 form
Hi, I have the following code working in a rails 3 view, but it is unfortunately not pure rails code! <% @filter1 = "tr.show1,tr.show2" %> <% @filter2 = "tr.show1" %> <% @filter3 = "tr.show2" %> <form> <p> <input type="checkbox" value=<%=@filter1%> onclick="$ (this).is('':checked'')
2006 Jul 05
4
degrading gracefully - how to tell if JS is enabled?
Is there a RoR best practice wrt determing in a visitor''s browser has JS disabled? Is there even a way to find out? I''ve got a couple of pages in my app that are not going to degrade gracefully at all. I really need to point a visitor who has JS disabled down a seperate path. Any ideas? Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed...
2006 Nov 30
4
response is null when using should_render_rjs
I''m trying to use rspec to test a controller that has ajax. I have the following action: def change_ad_type_form render :update do |page| page.replace_html ''ad_sub_form'', :partial => ''text'' end end and the following spec: specify "should return Text subform on AJAX request to change_ad_type_form" do
2007 Jul 05
3
Using conditions appropriately
I''ve been struggling with this function for most of the morning, but something just doesn''t seem right in my logic with respect to efficiency. I have a basic view that is submitting information on three variables directly to this function. The information is accessible simply through params[:filtera1], params[:filtera2] and params[:filtera1]. I''m trying to build a find
2006 May 18
4
Cascaded Forms
Hi guys, it''s me again ;) is it possible to put forms into forms? My problem is, i have a form which gathers informations about an SSL Certificate order. There is a field which holds the SSL CSR file. Now i wanted to put in a subform which has an form_remote_tag and decodes that CSR file and returns if everything was okay or not. Now if i put in a submit_tag it submits my form which
2006 Apr 22
1
RJS, scriptaculous, page.replace problem with input fields?
I''m hoping someone can help... I have an rjs template that invokes a couple of page.remove() calls that work fine, and a page.replace() call that does not. I''ve played with the javascript extensively from within Firefox''s FireBug module, and it seems to me that this is what is happening: What I''m trying to replace is an element that''s been
2011 May 30
5
rails habtm checkboxes with jquerymobile
Hi guys, I have a habtm association working properly. My application consists of both a desktop and a mobile version. My mobile version is made with jquerymobile and I would like my checkboxes in the edit form to look like the checkboxes shown in http://jquerymobile.com/demos/1.0a4.1/#docs/forms/forms-checkboxes.html. My desktop code is the following: <%= check_box_tag
2006 Jul 21
10
Using an image button for "link_to_remote"
All, I want to do an AJAX request using a custom image button. I currently have this as a standard button action using "button_to". What I need is the button equivalent of "link_to_remote". Is there a helper that I can use, or do I need to build it by hand? I see button_to_function(), but that sets me up to call a Javascript function, not post to a Rails action. Or can
2006 Aug 16
8
Multiple (AJAX) Observers on the Same Field and MSIE
I have been using multiple observers, i.e., observe_field(), on the same input field and relying on them to execute in the same order that they appear in the page. This has been working fine in FireFox, but it does not seem to work in MSIE; the requests come in and are processed in a different order. Now, I''ve always been a little hesitant about using this technique, but it always
2005 Dec 21
3
Checkbox readonly
I declare some checkboxes : <%= check_box_tag ''offers[]'', offer.id , @params[:offers].include?(offer.id.to_s) ,:readonly=>true %> the result is : <input checked="checked" id="offers[]" name="offers[]" readonly="readonly" type="checkbox" value="1" /> But readonly doesn''t work ??? -- Posted
2007 May 19
4
button_to_function with image?
Hi: does button_to_function allow the use of an image? I tried it in place of the text with "image_tag" and it doesn''t work. Maybe some form of button_to? Any direction you can give would be great! Mike -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Jul 17
3
Best practices - field initialization based on display rules
All, I have a form with the following field interaction rules. Given checkbox A, text field B text field C If checkbox A is checked then make text field C equal to the value of text field B and disable field C. If checkbox A is unchecked then enable field C. In order to display a form where I''m manipulating an already existing object, I have something like this in my RHTML template