File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
components/console/helpers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,10 @@ Let the User Choose from a List of Answers
113113
114114If you have a predefined set of answers the user can choose from, you
115115could use a :class: `Symfony\\ Component\\ Console\\ Question\\ ChoiceQuestion `
116- which makes sure that the user can only enter a valid string
117- from a predefined list::
116+ which makes sure that the user can only enter a valid string or the index
117+ of the choice from a predefined list. In the example below, typing ``blue ``
118+ or ``1 `` is the same choice for the user. A default value is set with ``0 ``
119+ but ``red `` could be set instead (could be more explicit)::
118120
119121 use Symfony\Component\Console\Question\ChoiceQuestion;
120122
You can’t perform that action at this time.
0 commit comments