fix hidden input

Adds the ability to specify a name for the hidden input field so it actually goes through in a form submit. Moved html templates into the options object so they are instance specific. Needed this for name replacement which was behaving statically. May be a better approach to this, but in quick an dirty mode at the moment.