added listener to add form to db when selected