added form #states and required fields