I’m currently working with a Webflow form that sends data via a webhook. The form includes a checkbox section (Addons
) that behaves differently based on user input:
- If one item is selected, it is sent as a string.
- If multiple items are selected, it is sent as an array.
I’m using {{join(1.Addons; ", ")}}
to concatenate the array items into a string for use in the next module. However, when only one item is selected (and it’s sent as a string), the module outputs a blank value instead of the string.
Here’s a sample payload received from the webhook:
[
{
"Address": "Avenue of the Giants, Redcrest, CA, USA",
"Property-Type": "Manufactured on land",
"Number-Of-Owners": "1",
"Is-owner-a-Trust-Corporation-LLC": "Yes",
"Your-listing-price": "854,000",
"Number-of-Beds": "4",
"Number-of-Baths": "2",
"Living-Area": "950",
"Lot-Size-SqFt": "1,260",
"Lot-Size-Acres": "",
"Lot-Size-Unit": "sq.ft.",
"Addons": "Broker Support Access", // This is the field in question.
"plan-webflow-id": "xxxxx",
"product-price-id": "price_xxxx",
"addons-stripe-id": "line_items[1][price]=price_xxxx&line_items[1][quantity]=1",
"plan-name": "Lean Plan",
"add-hp": "",
"Confirm-and-Accept": "on"
}
]
Problem: When Addons
contains just a single string, {{join(1.Addons; ", ")}}
outputs nothing instead of the string.
What I’m Looking For:
- A way to handle this scenario dynamically, so:
- If
Addons
is a string, it outputs the string. - If
Addons
is an array, it concatenates the values with a comma.
- If
- Any alternative methods or expressions that could resolve this issue effectively.