form addpost  functionality