From ed1be84c881d3616ff61c860f94055e4798b5138 Mon Sep 17 00:00:00 2001 From: jamiematrix <58532601+jamiematrix@users.noreply.github.com> Date: Mon, 16 Nov 2020 21:54:56 +0000 Subject: [PATCH] Update custom-twig-template-report.md Swapped the ID and Label fields round on the dynamic dropdown. Also added the array [] brackets to the loop, otherwise the drop down options are the values of ID and Label --- docs/reports/custom-twig-template-report.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reports/custom-twig-template-report.md b/docs/reports/custom-twig-template-report.md index d08604e9..53f00222 100644 --- a/docs/reports/custom-twig-template-report.md +++ b/docs/reports/custom-twig-template-report.md @@ -112,10 +112,10 @@ Use the Form Macros supported by the Craft CP to keep consistent with the Craft {% set categoryGroup = craft.categories.group('exampleCategoryGroup') %} {% set categories = [] %} {% for category in categoryGroup %} - {% set categories = categories|merge({ - label: category.id, - value: category.title - }) %} + {% set categories = categories|merge([{ + value: category.id, + label: category.title + }]) %} {% endfor %} {{ forms.selectField({