« previous module | next module »

Extensions » Modules » Hooks Manager

Documentation Translations Download

Hooks Manager


Introduction
Basic Usage Examples References

Warning! This module requires technical knowledge of PHP, Smarty templating or in the very least HTML.

So what does this module do?

The Hooks Manager module provides you with a simple interface to add your own code or HTML/Smarty markup allowing it to appear in Form Tools pages, or have it executed at particular junctures in the code. What code you choose to add depends entirely on your needs.

Form Tools has dozens and dozens of "hooks" littered throughout the code and within the Smarty templates used to generate the visible webpages. These allow developers like yourself to develop modules that extend the core functionality and display extra information in the UI.

Like to add new fields to any of the Form Tools pages? Like to send emails to notify yourselves when specific users change specific values in the form submissions? Like to know when users are exporting data? No problem! All of this - and far, far more, can be done relatively simply by using this module. To give you another idea, from a technical standpoint the entire functionality offered by the Submission Pre-Parser and Extended Client Fields modules could be emulated using the Hooks Manager. They were implemented as separate modules since they're easier to handle that way.

Hooks Manager vs. custom modules

This module adds nothing that can't be done via a custom module. But writing a separate module can be a bit of an uphill struggle: it requires learning about how the Form Tools module system works which can take time. Plus, often you don't need a UI for whatever it is you're doing: sometimes you just want something simpler; sometimes you don't need a pretty UI to allow people to use and configure it.

The basic difference is that for larger functionality - functionality that requires an interface for configuring its behaviour, you should run the gauntlet and learning about how modules work. But for OTHER uses, the Hooks Manager may well be a better fit.

To help you understand what this module can do, I'll provide a lot of examples in this documentation. They should give you a clue of two things: how powerful it is, and what kind of things it can do.

We'll start with a simple examination of the Hooks Manager UI: how you can utilize it to solve your problem.


Comments

Small mistake in codeSteven Heidel at Mar 21st 10, 7:28 PM
In $query, $g_table_prefix should just be $table_prefix.
Fixed.Ben Keen at Mar 28th 10, 8:22 PM
Thank Steven - all fixed.
HelpRaji R at Jun 7th 12, 4:44 AM
Dear Sir
If my formtools is installed not in the root directory but as a sub-directory ie www.mydomain.com/formtools, so how to adjust $g_root_url in the --- header("location: $g_root_url/?message=Sorry, account expired"); -- so as to point to the sub-directory where my script is located ?
Hope I made myself clear enough.
Regards
Raji R
HelpRaji R at Jun 7th 12, 4:52 AM
Dear Sir
Any advise us to how the utilize the "Hooks Manager" Module to add the values of two other cells into a new cell.
Hope you can guide through.
Regards
Raji R

You need to be logged in to post a comment. Log in here or click here to get an account!