Fixed the messy forms code inside .tpl files