Table of contents
The bug
When a flashcard contains multiple input fields and the back of the flashcard is shown, the answer of the first input field is considered to be the answer of all the following input fields.
Reproducing the bug
Let me clean my Anki data directory to ensure that a configuration of mine is not causing this issue.
rm -rf "$HOME/.local/share/Anki2"
Now, let’s create a new card type that have 5 fields with the following names Front
, Back
, my input field 1
, my input field 2
and my input field 3
(see image below)
The following is the Front Template
of the card type.
{{Front}}
<br> Type "my input field 1" below
<br> {{type:my input field 1}}
<br> Type "my input field 2" below
<br> {{type:my input field 2}}
<br> Type "my input field 3" below
<br> {{type:my input field 3}}
The following is the Back Template
of the card type.
{{FrontSide}}
{{Back}}
Now, let’s create a card with the following values in the fields (see image below).
The issue is when studying the card.
If I type the correct answer in all the input fields (see image below), all input fields are shown in green. Additionally, the answer of the first field is shown as the correct answer of all the input fields. This shouldn’t happen, instead each input field should show its own answer.
If I type the correct answer in the first field (see image below), and an incorrect answer in all the other input fields, all input fields are shown in green (this shouldn’t happen, the incorrect ones should be shown in red). Additionally, as happened in the first scenario, the answer of the first field is shown as the correct answer of all the input fields (this shouldn’t happen).
If I type the incorrect answer in the first field (see image below), but the correct answer in all the other input fields, all input fields are shown in red (this shouldn’t happen, the correct ones should be shown in green). Additionally, as happened in the first scenario, the answer of the first field is shown as the correct answer of all the input fields (this shouldn’t happen).
I think this bug can be summarized as: The answer of the first input field is assumed to be the answer of all the following input fields.
Additional information
I’ve read the article “Effective learning: Twenty rules of formulating knowledge” and I agree with the idea of “Stick to the minimum information principle” described there (i.e. we shouldn’t create flashcards that ask too much information).
I tend to keep my cards simple, but I currently have the need to show two input fields, because I’ve created cards for identifying chinese words in an audio, so I’m showing an input field for the chinese word (e.g. “勇敢”) and another input field for the pinyin along with the tones (e.g. “yong3 gan3”). I do it this way because I feel that it is when I can write the chinese character and the pinyin that I feel I succesfully remember a word. This is the reason why I’m interested in showing two input fields in the same flashcard.
System information
Anki version
I reproduced the issue by using Anki 2.1.54. Specifically, the file anki-2.1.54+rc3_a8e34ce4-linux-qt6.tar.zst
from the /downloads/beta directory.
./anki --version
Anki starting...
Initial setup...
Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Preparing to run...
Anki 2.1.54
Operating system
$ uname -m
x86_64
$ uname -r
5.18.16-arch1-1