To Database Add On.

The To Database add-on allows you to insert, update, or deletes rows from the database based on the information collected by the forms.

The To Database add-on is accessible through the "Contact > Extensions" menu option.

Extensions Section
Extensions Section.

The initial "To Database" screen includes the list of forms in which the add-on is being used and a section for integrating the add-on into other forms.

Initial Screen
Initial Screen.

The add on - form integration screen appears by pressing the "Settings" or "Add Integration" buttons in the initial screen. It loads the list of queries associated with the form.

Query List
Query List.

The query list section allows you to edit, delete or add new queries. It is possible to associate multiple queries to a form, which are evaluated in the order in which they were created.

The add-on supports three types of queries: INSERT, UPDATE and DELETE. All of them have a common section with the "title" attribute to identify the query. The "Type" attribute to select the type of query (INSERT, UPDATE, DELETE). And the database connection configuration.

Common Attributes
Common Attributes.

The database connection section includes a checkbox to use the website database. Or you can untick the checkbox to enter the database connection attributes manually, "Hostname", "Username", "Password", and "Database".

Database Connection Attributes
Database Connection Attributes.

Each query type enables a specific set of attributes.

Insertion Query

Insertion Query
Insertion Query Attributes.
  • Table name: name of database table.
  • Column name: name of the column to be filled.
  • Field name: name of the form field whose value will be used to fill the table column.
  • Default value if empty: value to use if the field does not exist or is empty.

By pressing the "Add pair" button adds additional columns/fields to the query.

Update Query

Update Query
Update Query Attributes.

The "Where" section allows you to filter the rows to be updated.

Delete Query

Delete Query
Delete Query Attributes.

The plugin allows you to enter the queries manually by ticking the "Custom query" option.

Custom Query
Custom Query.

With queries you can use the constants supported by the recordset tags.

Logs
Logs.

By checking the logs checkbox, the add-on will add a new record in the error logs file on the server each time a query fails.