edit mode in multi-if-else template