disable submit when in preview mode