Your code is mostly correct, except:
Add
list
attribute to@inputText
arguments:@inputText(searchForm("langCode"), '_label -> "Language", 'list -> "langCodeDatalist")
Make sure
id
used fordatalist
is different from the one used for the input box:< datalist id="langCodeDatalist">
Once I made these changes, it worked. Check the source code to make sure @lang.langCode
is getting pasted correctly.