fixed form dom creation and added click events