Injecting data to hidden fields

I get how to do this with url querystrings but what if I would like to grab a cookie value and inject that into a hidden field, is that possible?