Currently, the FormsCRM WordPress plugin does not correctly send custom fields when submitting data to Companies in the CRM integration. The issue occurs during form submission, where company custom fields are either not mapped or not included in the API payload.
Expected Behavior
- Custom fields mapped in the plugin settings should be properly sent to the CRM when creating or updating a Company.
- The payload should include all custom fields defined by the user.
Actual Behavior
- Only standard company fields (name, email, phone, etc.) are being sent.
- Custom fields are ignored or missing in the request body.
Steps to Reproduce
- Create or edit a form in WordPress using FormsCRM.
- Add custom fields to map to company data.
- Submit the form.
- Check the CRM to confirm missing custom fields.
Technical Notes
- Investigate the mapping logic in
class-formscrm-api.php and class-formscrm-company-handler.php.
- Ensure
custom_fields or equivalent meta fields are included in the API request.
- Consider adding a filter or hook (
formscrm_before_send_company) to allow developers to modify payload data.
Acceptance Criteria
Migration Table (if applicable)
| Field |
Type |
Description |
custom_fields |
JSON |
Stores additional company data sent to CRM |
Currently, the FormsCRM WordPress plugin does not correctly send custom fields when submitting data to Companies in the CRM integration. The issue occurs during form submission, where company custom fields are either not mapped or not included in the API payload.
Expected Behavior
Actual Behavior
Steps to Reproduce
Technical Notes
class-formscrm-api.phpandclass-formscrm-company-handler.php.custom_fieldsor equivalent meta fields are included in the API request.formscrm_before_send_company) to allow developers to modify payload data.Acceptance Criteria
custom_fieldsobject when applicable.Migration Table (if applicable)
custom_fields