It’s my understanding that the selector’s default option is merely a suggestion displayed in the UI. If the user doesn’t supply a value, the variable has no value and is undefined. It explains why you got this error message:
Erreur: UndefinedError: ‘delai_fermeture’ is undefined
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.