Fix form validation - refs #7277
Add functions to build thread by post and their actions - refs #7277