I am trying to set up a webform on my Drupal website, which I want to submit via a form handler to Pardot.
One of my fields is a multi-select in Pardot with pre-defined values. I need a question on my Drupal form which can receive multiple values (I have tried both a multi-select, and checkboxes) and then submit them via the form handler, but this isn’t working. All other fields submit to Pardot no problem, but this field stays blank.
I would be very grateful if anyone would be able to offer some advice, because I’m completely lost!
The field name on my webform is commercial_services. If I inspect the code on the form, as a multi-select it becomes commercial_services[]. I have tried using both of these as the External Field Name on my form handler, but neither has worked.
If I try using checkboxes instead, then the names become: commercial_services[option1] commercial_services[option2] etc. This confused me because following this tutorial for a similar task https://blog.derakkilgo.com/2022/02/17/checkboxes-on-pardot-custom-form-handler-arent-saving-did-you-forget-the/, I expected the contents of the square brackets to be blank. Instead, each name contains the value within the square brackets, so I wonder if that means I can’t accurately add the External Field Name on the form handler?
Within Pardot, I am able to use this field in a regular form (in an iFrame as opposed to using a form handler) with multiselect, and it works no problem. All the values in my webform 100% match their predefined values in Pardot too, so that can’t be the issue.