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
113
113
114
114
If you have a predefined set of answers the user can choose from, you
115
115
could 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)::
118
120
119
121
use Symfony\Component\Console\Question\ChoiceQuestion;
120
122
You can’t perform that action at this time.
0 commit comments