This repo contains the Form Tools API, providing some methods to interact with and extend Form Tools, such as:
The API documentation is pretty thorough. Please refer to one of the following sections:
Form Tools 3 was a complete rewrite of the application, including changing the codebase from functional code to object-oriented. The API v2.x was updated for Form Tools 3 compatibility, converting the API into a class.
In terms of functionality, v1.x and v2.x of the API are identical: they (currently) provide the same methods. What's changed has the way you call the API methods.
The documentation links above contains in-page example code for all the methods, but for something more hands-on
check out the examples/
folder in this repo. That contains some simple, bare-bones examples (no CSS!) of some of the
API methods that can easily be shown. Other methods such as the form integration methods need additional work to
configure Form Tools - so couldn't be included. See the tutorials for further
info on them.
Thev1/
folder contains the old Form Tools 2.x compatible API methods (version 1.x of the API); the v2/
folder contains Form Tools 3 compatible API methods (version 2.x of the API). For Form Tools 3 users, please use
the v2/
folder examples - v1/
is just provided for people upgrading to Form Tools 3 and want to keep
compatibility with their existing API forms and usage.
[Form Tools root]/global/api/ folder
. examples-config.php
file in this folder to set the $examples_enabled = true;
variable. The examples
are all disabled by default to prevent accidentally exposing your Form Tools submission data to the outside world.
If you're worried about this, just move the examples folder wherever you want on your server and change the paths
to the api.php/API.class.php file. Please create an issue on this repo.