Form Collapse and Conditional statement not working correctly.