@@ -77,7 +77,7 @@ from a predefined list::
7777 $question = new ChoiceQuestion(
7878 'Please select your favorite color (defaults to red)',
7979 array('red', 'blue', 'yellow'),
80- 'red'
80+ 0
8181 );
8282 $question->setErrorMessage('Color %s is invalid.');
8383
@@ -109,9 +109,9 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
109109
110110 $helper = $app->getHelperSet()->get('question');
111111 $question = new ChoiceQuestion(
112- 'Please select your favorite color (defaults to red)',
112+ 'Please select your favorite colors (defaults to red and blue )',
113113 array('red', 'blue', 'yellow'),
114- 'red '
114+ '0,1 '
115115 );
116116 $question->setMultiselect(true);
117117
@@ -121,6 +121,9 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
121121Now, when the user enters ``1,2 ``, the result will be:
122122``You have just selected: blue, yellow ``.
123123
124+ If the user does not enter anything, the result will be:
125+ ``You have just selected: red, blue ``.
126+
124127Autocompletion
125128~~~~~~~~~~~~~~
126129
0 commit comments