Fill in template fields