Collecting values to one string

Hi

I recently (almost) finished my first Webflow project but have some difficulties with submitting values.

You find it at https://lesetexter.webflow.io/

As shown on the screenshot I have a form with several Inputs (checkboxes, dropdowns, radios, text area (1)). Now by clicking on the button “Generieren” (2) I’d like to pass a string consisting of the individual values of the inputs to an API.

I failed several times collecting all the values and combining them to one string (value 1 + value 2 + value 3 -…). Can anyone here help me with this?

THX in advance

Hi Marc, you’re using Wized which isn’t part of Webflow itself.
You’ll likely get much better answers in the Wized forum.

But I think webflow also should have some options to collect values in a form, doesn’t it?

Webflow basically uses default form behavior, so the browser is simply submitting the data from the fields. I don’t think it generates e.g. CSV strings if that’s what you’re looking for.

You can prepare the data however you like in a custom code onsubmit handler though.

Hey Marc,
So If I understand correctly you want to grab and collect the values from the inputs & combine them into one string & post it to an API.

Depending on if I have understood you correctly, there are two ways I would suggest achieving this. Both ways are using Webflow logic, you can make HTTP requests natively in Webflow.


1st: Sending via JSON data to the API:

-X POST https://yourapi.com/
-H Content-Type: application/json
-H Authorization: (If you need it)
-D {"{fieldOne}{fieldTwo}{fieldThree}"}

Screenshot 2023-10-29 at 00.39.05


2nd: Sending via parameters in the URL to the API.

-X POST https://yourapi.com/{fieldOne}{fieldTwo}{fieldThree}
-H Authorization: (If you need it)

Screenshot 2023-10-29 at 00.40.48

-X POST https://yourapi.com/?data={fieldOne}{fieldTwo}{fieldThree}
-H Authorization: (If you need it)

Screenshot 2023-10-29 at 00.41.36


I hope this has helped!