added lines that populate hidden inputs

these lines set the value for the hidden inputs to variables that are available in certain functions