Fixed required fields generation in module creation

Had a problem with HTML form elements generating incorrectly with details going out of bounds of the tag. Hope the fix is right, because I haven't understood why it was that way before.