This plugin connects GravityForms with ZGW by using the owc/zgw-api package. In order for the connection(s) to work the ZGW registers must be configured on the settings page (/wp-admin/options-general.php?page=zgw_api_settings).
Read the documentation of the owc/zgw-api package on how to get started
When this plugin is activated, it adds functionality to configure a form for creating a zaak, uploading documents to that zaak, and appending a submission PDF.
In the GravityForms settings page, navigate to the "OWC ZGW" tab. This section allows you to configure general settings that apply to all forms connected to ZGW.
A RSIN number is required for creating a zaak. Make sure to fill this out correctly as it is used in all zaak creation requests.
Enable logging to keep track of errors during communication with the ZGW supplier(s).
- Logs are written daily to
owc-zgw-log{-date}.json
in the plugin root directory. - A rotating file handler keeps up to 7 log files by default, deleting the oldest as needed.
- You can change the maximum number of log files using the filter described below.
Use the following filter to alter the rotating file handler's max files setting:
apply_filters('owcgfzgw::logger/rotating_filer_handler_max_files', OWC_GRAVITYFORMS_ZGW_LOGGER_DEFAULT_MAX_FILES)
On the Form Settings page, scroll down to find the section titled "Zaaksysteem". This section contains all the required settings for each form.
- Select a supplier (e.g., Decos).
- Choose how to configure supplier-specific settings:
- Option A: Dynamically
- Select a Zaak type.
- Select an Information Object Type related to the chosen Zaak type. (used for the submission PDF)
- Option B: Manually
- Enter the Zaak Type URL from the supplier’s catalog.
- Enter the Information Object Type URL from the same catalog. (used for the submission PDF)
- Option A: Dynamically
✅ Once this configuration is complete, you can begin mapping form fields to ZGW fields via each field’s settings.
Each form field needs to be mapped to a ZGW field.
Use the dropdown labeled "Zaaksysteem mapping" in the field settings to map the form field to a ZGW property.
- These fields are used to create the zaak and set zaak eigenschappen (case properties).
- At minimum, you must map one field to the ZGW field "omschrijving" (description).
- Other required fields will be auto-filled from plugin general and specific form settings.
Regular Field Mapping:
- Use "Zaaksysteem mapping" to map the field to "informatieobject".
- Use the second dropdown "Document typen" to link a document type to the upload field.
Upload Field Mapping:
To add a document description to the uploaded file in the configured "Zaaksysteem", use the field as shown below.
You can also include form values in the description by using the format [field_id]
.
After a successful form submission, a PDF is generated using the Gravity PDF plugin. This PDF contains the full submission and is automatically uploaded and attached to the corresponding zaak in the ZGW register.
⚠️ For this to work, you must configure an "Information Object Type" in the form settings.
The plugin disables SSL peer verification only when the environment value contains 'dev' (at the bare minimum). To enable this behavior, you need to define the WP_ENVIRONMENT_TYPE constant in your wp-config.php.
define( 'WP_ENVIRONMENT_TYPE', 'development' );
Local environments often lack valid SSL certificates, which can cause file_get_contents() or other HTTP requests to fail due to peer verification errors. This configuration ensures smoother development without compromising production security.