I am so bad at javascript, and seem to have real trouble searching these forums for similarly posed problems, so apologies if this is either really easy or impossible but been asked a million times before: How do I set a value's max to equal another value? I have tried < input name = "attr_vigor" class = "underlined vigor" value = "0" min = "0" max="@ {vigor|max}" type = "number" title = "@{vigor}" /> < input name = "attr_vigor_max" hidden = "true" type = "number" title = "@{vigor|max}" /> which doesn't work... vigor_max is calculated by a sheetworker, which just returns " attributes . vitality * ( 4 - attributes . wounds )" any help?