add hidden field tag in the right spot