Handle form submition and result view and templete