added the generation of the hidden fields