selects one of two templates and records the choice in the database