[dev] custom bottons in Horde_Form

Jan Schneider jan at horde.org
Thu Dec 14 07:06:51 PST 2006


Zitat von Duck <duck at obala.net>:

> It is possible to add a custom button in Horde_Form that is not a submit
> bottom? I would like to add a custom button to quote the message body
> replaying to a comment. So the replay form show up empty, and the original
> message body is copied with JS only when the user chooses it. I quess I must
> classicaly extend the renderer. Or maybe is better to extend the htmlHelper
> JS?

I suggest that you attach an action to that button that inserts the  
quoted text and returns false. It *should* stop the form from being  
submitted then.
That had the additional advantage that you can implement a fallback  
method if javascript is disabled and the form is actually submitted.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list