Multiple event ticket information in formValues value in Wix Events API Checkout

Question:
Hi I am building a custom process to buy tickets for an event in Wix Events. I am using this documentation as a reference: checkout - Velo API Reference - Wix.com

My problem is:
I can’t seem to put together a formValues that can hold the data for each ticket. In cases where there is more than one ticket.

Any idea? Thank you very much

Product:
Wix Events API

What are you trying to achieve:
Build a custom process to buy tickets for an event in Wix Events. I am using this documentation as a reference: checkout - Velo API Reference - Wix.com

Hello!

Unfortunately, it seems that currently formValues only takes one set of inputs. However this has been a requested feature and we are working on improving the API to support more use cases.

The Wix Events v2 API will support this use case soon, but is still currently under Developer Preview so it isn’t recommended for use in production. Keep an eye out for its stable release. If you have any other suggested features or want to stay updated with upcoming changes, take a look at the Wix Roadmap.

If it’s of any use, I found a workaround that, while not being perfect, will do.

let url = wixLocationFrontend.url;
$w(‘#form1’).onSubmit((values) => {
eval(“values.your_value = YOUR_VALUE”);
$w(“#form1”).setFieldValues(values);
$w(‘#form1’).submit();
return false;
});

It will send the form twice, but in one of them you’ll see your overwritten data. Important: don’t try adding fields here, use previously defined fields in your Wix Form