The JS code snippet is the same in multiple places => better use a string template and the name of the input hidden given as parameter => 2 advantages:
1. less error prone
2. since these string constants are usually interned, you will have less memory usage in the string pool