Helper Functions

Form Tools comes with a number of functions to simplify the job of writing your module. It's well worth glancing over the following functions just to see what functionality is available so that you don't end up writing duplicate code.

One thing to mention before getting started: the module folder names have special meaning within Form Tools. Since the module names themselves are translated based on the users language, and the module ID DB value may be different for the same module between two different installations, the majority of these functions below use the folder name to uniquely identify the module. So "pages" refers to the Pages module, "export_manager" refers to the Export Manager module and so on. These module folder names act as the modules namespace (both in terms of the files and referencing the code) and should not be renamed by administrators. So as a developer, you can make the assumption that the module folder names are consistent across all installations. So, for example, if you use the ft_check_module_enabled and ft_include_modules function to import the Pages module, this is perfectly valid and encouraged:

if (ft_check_module_enabled("pages"))
  ft_include_modules("pages");
Edit Page