Displaying 11 results from an estimated 11 matches for "my_form".
2006 Apr 22
3
rjs woes, any hints?
...pared my rjs experiment down to what seems a bare minimum. When I click
on my link_to_remote, the rjs executes, returns the correct javascript to
the browser, but it doesn''t update the div I''ve specified. What appears to
be coming back from the controller is:
Element.update("my_form", "hello, rjs");
I''m tearing my hair out. Here''s the code (any help is much appreciated):
--post_controller.rb--
def new
end
--new.rjs--
page.replace_html ''my_form'', ''hello, rjs''
--list.rhtml--
<p><%= link_to_remote(...
2006 May 09
2
[Prototype] Why doesn''t calling submit() on a form result in the execution of the onsubmit event handler?
Hi,
Is it normal that a call to $(''some_form'').submit() doesn''t result in the
execution of an onsubmit event handler on ''some_form''?
Thanks,
- Rowan
--
Morality is usually taught by the immoral.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Dec 28
2
form reset after successful form submission
hi,
what''s the way to reset the form generated by the form_remote_tag
after the successful submission of the form?
thanks
2007 Dec 08
2
Assigning submit handler to form
Hi folks,
A quick question for somebody. I''m adding a simple validation JS to my
form by attaching it like so:
$(''my_form'').observe(''submit'', function(e) { return
view_ns.validate_form(Event.element(e)); });
The validate_form() function returns true or false. But regardless of
it''s return value, the form is always submitted. ''sup wi dat''?
Any ideas? Oh, and it...
2008 Jul 27
2
Rails Cookbook review
Guys:
Stuck at the mall today, and just had to crack Rails Cookbook, by O''Reily. It
had a recipe for accepting dynamically created forms. The sample output looked
like this (reconstructed):
p params[:my_form]
> ["1-1" => 0, "1-2" => 0, "1-3" => 0, "2-1" => 0, "2-2" => 0,
"2-3" => 0, "3-1" => 0, "3-2" => 0, "3-3" => 0]
--~--~---------~--~----~------------~-------~--~----~
You...
2006 Jan 18
6
Autocomplete related fields
I have a table that has city, state and postal code. I want to
auto-fill the city and state when a postal code is entered.
The city and postal code are simple text fields, but the state is a
drop-down list with abbreviations as the value, and the full state
name as the option text.
I assume with Ajax.Updater I could just return the HTML for both the
city and state fields -- including the entire
2011 Sep 13
3
Accessing Rails helper method with_output_buffer
...ActionView::Helpers::CaptureHelper) inside a custom
FormBuilder.
Below follows a simplified example.
I''m trying to achieve the following behavior in an ERB as suggested in
the form_for helper docs in the Rails source:
==========
<%= form_for @object, :builder => MyFormBuilder do |my_form| %>
<%= my_form.my_dummy_div_wrapper do %>
<%= ... %>
<%= end %>
<% end %>
==========
Here''s the helper:
==========
module MyHelper
class MyFormBuilder < ActionView::Helpers::FormBuilder
def my_dummy_div_wrapper(&block)
output = "...
2006 Jul 26
1
my "observer" is blind
Any body have an idea why my first attempt to use "observe_field" isn''t
working?
<%= start_form_tag(:name => ''my_form'', :controller => ''boo'' , :action =>
''ya'') %>
<%= radio_button_tag(''foo'', ''true'', checked = true) %>
<%= radio_button_tag(''foo'', ''false'', checked = false) %>
&l...
2006 Jun 10
0
DRY Up Lots o'' Mailers
...r-confirmation types of
forms. It''s daunting when you think about how many files it takes to do
this. I''m not coming up with an obvious "Rails" way to pull it off, so I
thought it''d be good to know if anyone else has worked through this (7 per
form!).
models/
my_form_data.rb
my_form_data_mailer.rb
controllers/
my_form_controller.rb
views/
my_form/
index.rhtml
show.rhtml
my_form_data_mailer/
sent.rhtml
confirm.rhtml
I''ll concede that I have to write this code once, but once for each form? So
the notion begins to occur to me......
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 Mar 31
2
Rails and Partials
...s to
create two partials:
_start_box.erb
----------------
<table id="box" width="<%= width %>"><tr><th><%= h(label_text)
%></th></tr><tr><td>
_end_box.erb
----------------
</td></tr></table>
The to use it my_form.erb
----------------
%= render :partial => "start_box", :locals => { :label_text => "Box
Label", :width => "97%" } %>
<b>Some Text</b><br />
<b>Some More Text</b><br />
<b>Some More Text</b><br /&g...