There seems no way to add a custom form handler to a form from a whlib.
Use case: every form in the application should use a custom form handler (which mails the results to addresses defined by the backend). Instead of having to add it to every form, we’d like to “just” use the form handler in every form.
We already have a
EXTEND WebtoolFormHooks, but is there a way to add a handler? The
WebtoolFormBase provides some functions (
GetHandlers()) but there seems to be no function to add a handler.
I noticed an
AddHandler function in the
FormDefinition but that can probably not be used at runtime. Might work for a script that adds the handler to every form, but I’d rather just add it through a whlib; makes the form content cleaner too.
Looping in @Anferney