File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 530
530
by default. Take care if your JavaScript relies on that. If you want to
531
531
read the actual choice value, read the `value` attribute instead.
532
532
533
- * In the choice field type's template, the structure of the `choices` variable
534
- has changed.
535
-
536
- The `choices` variable now contains `ChoiceView` objects with two getters,
537
- `getValue()` and `getLabel()`, to access the choice data.
533
+ * In the choice field type's template, the `_form_is_choice_selected` method
534
+ used to identify a selected choice has been replaced with the `selectedchoice`
535
+ filter.
538
536
539
537
Before:
540
538
549
547
After:
550
548
551
549
```
552
- {% for choice in choices %}
553
- <option value="{{ choice.value }}"{% if _form_is_choice_selected (form, choice ) %} selected="selected"{% endif %}>
554
- {{ choice. label }}
550
+ {% for choice, label in choices %}
551
+ <option value="{{ choice }}"{% if choice is selectedchoice (form) %} selected="selected"{% endif %}>
552
+ {{ label }}
555
553
</option>
556
554
{% endfor %}
557
555
```
You can’t perform that action at this time.
0 commit comments