diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index eeddb8031de..bf33c55189d 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -37,8 +37,8 @@ Example Usage .. code-block:: php $builder->add('public', 'checkbox', array( - 'label' => 'Show this entry publicly?', - 'required' => false, + 'label' => 'Show this entry publicly?', + 'required' => false, )); Field Options diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index a5757116817..d271f5ec59c 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -51,8 +51,8 @@ user sees on the form (e.g. ``Male``). .. code-block:: php $builder->add('gender', 'choice', array( - 'choices' => array('m' => 'Male', 'f' => 'Female'), - 'required' => false, + 'choices' => array('m' => 'Male', 'f' => 'Female'), + 'required' => false, )); By setting ``multiple`` to true, you can allow the user to choose multiple @@ -62,12 +62,12 @@ of checkboxes depending on the ``expanded`` option: .. code-block:: php $builder->add('availability', 'choice', array( - 'choices' => array( + 'choices' => array( 'morning' => 'Morning', 'afternoon' => 'Afternoon', 'evening' => 'Evening', ), - 'multiple' => true, + 'multiple' => true, )); You can also use the ``choice_list`` option, which takes an object that can @@ -90,7 +90,7 @@ by this field. The ``choices`` option is an array, where the array key is the item value and the array value is the item's label:: $builder->add('gender', 'choice', array( - 'choices' => array('m' => 'Male', 'f' => 'Female') + 'choices' => array('m' => 'Male', 'f' => 'Female'), )); .. tip:: diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 16cf2dc0a16..ddead19b901 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -76,7 +76,7 @@ option. The easiest way to use the option is as follows:: $builder->add('users', 'entity', array( 'class' => 'AcmeHelloBundle:User', - 'query_builder' => function(EntityRepository $er) { + 'query_builder' => function (EntityRepository $er) { return $er->createQueryBuilder('u') ->orderBy('u.username', 'ASC'); },