Awesome Plugin, just facing one issue with webhook.
-
Use?Case?Overview: We are collecting leads through forms on various landing pages, and these leads are integrated into our CRM via a webhook. The CRM has limited field mapping capabilities, allowing only basic fields such as name and email to be mapped directly.
For other crucial customer details—like the child’s name, date of birth (DOB), and the services they are interested in—we use a generic “additional info” key field to capture these details in bulk.Current?Issue: When configuring the webhook for field mapping, the webhook integration presents a dropdown for mapping only one value at a time. However, we need the ability to map multiple values (such as DOB, child’s name, and service required) to the “additional info” field using a multi-select option.
While I can combine values using custom HTML and dynamic input values, these concatenated values are not being properly stored or displayed after submission. I need either a solution to modify the webhook’s behavior to support multi-select mapping or a custom code solution that ensures the concatenated values are properly passed and stored in the CRM.
For this the solution suggest is this:
// Hook into the FluentForm webhook to combine fields before sending data
add_filter('fluentform/webhook_request_data', function ($selectedData, $settings, $data, $form, $entry) {
// Retrieve individual field values from form submission data.
$dropdown1 = isset($data['service_required_1725528048418']) ? $data['service_required_1725528048418'] : '';
$dropdown2 = isset($data['preschool_branch']) ? $data['preschool_branch'] : '';
$dropdown3 = isset($data['activity_type']) ? $data['activity_type'] : '';
$dob = isset($data['child_s_dob_1725528397702']) ? $data['child_s_dob_1725528397702'] : '';
$name = isset($data['child_name']) ? $data['child_name'] : '';
// Combine the dropdowns, date of birth, and name into a single string.
$combinedField = $name . ' - ' . $dropdown1 . ', ' . $dropdown2 . ', ' . $dropdown3 . ' - DOB: ' . $dob;
// Add the combined field to the webhook data.
$selectedData['combined_info'] = $combinedField;
// Return the modified webhook data.
return $selectedData;
}, 10, 5);I have added this to the functions.php file but now how should I map the “combined_info” with the “additional_info” key or feild name.
https://drive.google.com/file/d/17qkhiDgCH69zkiN7Gb9qf80ktYe6fH-I/view?usp=sharing
Help me out here.
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.