Making your own FormBuilder

Hey all

So I can follow this and make my own form helpers by extending
FormBuilder …http://www.sepcot.com/blog/2008/05/Accessible-Field-
Errors

Also in that tutorial it shows how to redefine “field_error_proc”

My question is … is it possible to define the “field_error_proc”
method JUST for your own version of the ForumBuilder?

Or maybe, inside the field_error_proc method, I could test to see what
class of FormBuilder is being used, and then decide on the behavior?
(super as the default?)

thanks for any suggestions!
:slight_smile:

I could easily do this:

ActionView::Base.field_error_proc = Proc.new { |html_tag, instance|
html_tag
}

But that kills the default functionality for
ActionView::Helpers::FormBuilder

Struggling to find some logic to test whether the call to
field_error_proc is coming from the base ForumBuilder or the extended
version… since I’d like the leave the default one alone