Custom Code in Form Submission -- How to get values?

Hi Webflow community!

I have recently built a form that had a City & Region select field, which was built via custom code since the Region field was dependent on the City of choice.

It has been working on both desktop and mobile, and works well. I just cannot find a work around on the Form Submissions data itself. I wanted to get the values of the City & Region (America, California for example) fields as “text”, but they are currently numbers (1,2,3,etc.)–representing their order on the select choices.

May I know if there is a workaround? Or some edit I could do to the code so its value could be called upon submission?

Here is my site Read-Only (2 dropdowns on the form):

In an HTML select, the value is passed, so you’d need to redesign your custom code to contain the text rather than a numeric value.

I can’t see your code, however my guess is whoever wrote it has a table of numbered cities and regions, which are referenced by the city number. The simplest redesign is probably to store that link on the select option as a custom attribute that your scripts can see rather than setting it as the value which will get picked up in the form submit.