Documentation Download as PDF
Form Integrations
Form integrations are plugins that take form data and manipulate it or utilize it after it has been submitted to the database.
Writing Form Integrations
There are 3 potential methods in form integrations and they are all passed the same arguments:
- int_[filename]_save (argument: array containing keys [form], [values])
- form is the ID of the current form
- values is an array of the submission values
- int_[filename]_edit (argument: array containing keys [form], [values])
- Note: Form rows are only able to be edited in the backend.
- int_[filename]_validate (argument: validated array as reference)
- Identify which form was submitted by using form_get('form_id'). This returns the numeric ID of the form.
- Using form_get_all(), you can retrieve all of the variables submitted to the form (e.g. "field10", "field11", etc.).
- If you find an error in one of the fields, simply add a key/value pair to $validated in the form of:
<?php $validated['fieldname'] = 'Error text.';
