From 07230432e2a85a77ca575abb771e597b06b1ad28 Mon Sep 17 00:00:00 2001 From: Matthieu DANET Date: Tue, 24 Nov 2020 10:35:10 +0100 Subject: [PATCH] Fix wrong key name --- reference/forms/types/options/choice_attr.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/choice_attr.rst.inc b/reference/forms/types/options/choice_attr.rst.inc index b26f2099023..5a0add4f195 100644 --- a/reference/forms/types/options/choice_attr.rst.inc +++ b/reference/forms/types/options/choice_attr.rst.inc @@ -49,7 +49,7 @@ If an array, the keys of the ``choices`` array must be used as keys:: // ... $builder->add('choices', ChoiceType::class, [ - 'choice_label' => ChoiceList::attr($this, function (?Category $category) { + 'choice_attr' => ChoiceList::attr($this, function (?Category $category) { return $category ? ['data-uuid' => $category->getUuid()] : []; }), ]);