Forum: Ruby on Rails Rewriting FormBuilder

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
03cb7371db223067d0daab54e1f95cb2?d=identicon&s=25 Abdur-Rahman Advany (Guest)
on 2005-12-28 00:31
(Received via mailing list)
Hi,

I want to extend formbuilder to make it output a lable (I know about
labeled_form_helper made by technoweenie), my own formating, and a
couple of extra tags inside the form attribute. I was easily able to
extend form_remote_to. But when I continue to adjust the way elements
are handled I don't know how to continue. I can't find the method
text_field thats should is available in FormBuilder. I only see a 2
methods and a few other methods (form_options and date selectors) in
other files.

I have looked at labeled_form_helper, but it doesn't work (I use
EdgeRails). So I though of making my own formbuilder, but I can't find
how things like text_field methods for formbuilder are created...

thnx,

Abdur-Rahman
03cb7371db223067d0daab54e1f95cb2?d=identicon&s=25 Abdur-Rahman Advany (Guest)
on 2005-12-28 00:43
(Received via mailing list)
OMG, I am soooo stupid, didn't read the following line correct
(FormHelper.instance_methods - [ :check_box, :radio_button ]).each do
|selector|

oeps :)
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2005-12-28 03:44
(Received via mailing list)
> > I have looked at labeled_form_helper, but it doesn't work (I use
> > EdgeRails). So I though of making my own formbuilder, but I can't find
> > how things like text_field methods for formbuilder are created...

It doesn't work because there are a few minor patches that need to be
made for it.  See the latest patch on #3268
(http://dev.rubyonrails.org/attachment/ticket/3268/...).
Basically, I need the ability to pass my own FormBuilder class to the
*_for methods.

Also, (FormHelper.instance_methods - [ :check_box, :radio_button ])
didn't seem to work for me.  The method names were strings, so I
needed - %w( check_box radio_button ) instead.
--
rick
http://techno-weenie.net
This topic is locked and can not be replied to.