Move form tag to outside conditional