I've been working with input for captive portals and wanted to pass hidden data based off the selection (in this case a drop down).
If you use font-size:0pt the text is passed but not shown in the dropdown.
This is a sample of how I'm building the list:
allPortals = json.append(allPortals,"<html><b>"+oneZone+":</b><br>"+getName(onePad,oneZone)+"<br><span style='font-size:0pt'>"+onePad+"</span>")]
you'll need to strip out the html via replace or a regex to "clean" the output to "raw text"
The input example image was attached.
The output example: Grasslands:^ActionPads Stairs Down Token^09BD04C5487B4F40936A0DCBF575A727
In this example I've hidden the mapID (and will be adding the tokenID the same way whilst hiding both from the user).