This code is inside an override of the user/register.tpl and the variable is accessible. But this is not the problem because it works with the other fields of the form (email, password, etc.)
In fact, it is as if the system was not able to read the content of the value="whatever" of the input.