Add form logic.