Hi,
I am receiving form data in MAKE via the webflow app. In addition to all the form information, I would like to know which locale the form was used from, so I can route the requests according to the locale language.
Any ideas how to pass along that data?
Thanks so much for your help.
Tobias
The LocaleID would take some work but you can easily write some script to grab the lang=
attribute from the <html>
element, and then pass it into your form as a hidden field.
That gets your the locale language and region codes e.g. en-US
which is a bit more readable.
@memetican Thank you. I wouldnāt know how to pull that information.
But, I have tried this script, which I am successfully using in another webflow form (that uses logic to transmit the data).
<script>
document.forms['newsletter_signUp'].elements['language'].value = 'de'
</script>
This current form does not use logic. It works simply as a form and then the webhook gets triggered and is then received by the webflow module in make.
The ālanguageā field however remains empty in the transmited bundle.
Youād have to double check the names of your form and your hidden input element, since thatās what your code depends on.
Also itās not getting the current language, but rather always de
. I might not be understanding what youāre trying to build.
Logic works differently as you cannot use input type=hidden there, you must use a Webflow input element, and then set it to display: none.
Michael, thank you for your help.
All names match.
Yes, as a simple solution I have manually entered ādeā. When I switch the webflow locale in the designer to English, I can actually change ādeā to āenā in the script. That appears to be supported. In the German locale the script then reads ādeā and in the English locale it reads āenā.
However regardless that workaround, the field does not receive that input. I added an input element to the form, named it, set the display to none. Just to double check, I published the form with the field visible but it is empty.
Youāre missing something. Without digging into it and building a solution ( direct message me if you would like to discuss rates ), the only possible glitch I can guess is that maybe you have your script in the head instead of the body, and the elements youāre setting donāt exist yet when the script runs.