Answer of first input field is considered to be answer of following input fields

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
2 Likes

The card layout screen is misleading here - only a single field is supported during review: Field Replacements - Anki Manual

You can either put all content in a single field, or have Anki create multiple cards, each testing you on one thing.

2 Likes

@dae Thanks for the reply.

I think Anki should support multiple type: fields in a card. This would give more flexibility to users to create the cards they desire, since some users, as me, might have their own reasons to show multiple type: fields in an Anki flashcard. Those that prefer showing at most one type: field wouldn’t be affected by this change.

I’m not the only one that would be interested in this feature. Here are some other users that asked or created an add-on for having this behavior.

  • In January 2016, this add-on that enables this behavior was last updated.
  • In March 2016, someone asked about this behavior in this thread.
  • In June 2020, someone created an add-on for enabling this behavior.
  • In September 2021, someone created a thread to ask for increasing the number of type: fields.

I’m aware that there’s a common conception that questions and answers in flashcards should be specific and answers should be specific (Wozniak’s minimum information principle). This could be the reason why some people think that having multiple type: field is not recommended. However, some people might have their own reasons to show multiple type: fields, and they shouldn’t be restricted by the fact that Anki is not capable of having this behavior.

For those that want to show showing multiple type: fields in Anki. I just tried the add-on I mentioned before and it works well with Anki 2.1.54.

I hope some day this behavior is implemented into core Anki.

PS: The [bug] part in the title of this thread was removed. Apparently, the administrators of this forum believe this is not a bug. I do think it is a bug.