For hidden fields, can i use a field of the type ... You absolutely can, I use this approach a lot w/ both JavaScript and PHP. Field definition:
stackoverflow.com