Adding a condition based on which the confirmation box is shown or not