more template variables and a fix for mandatory checkbox