How to set up an Anki card with input field

One of the most usefull features to learn code with Anki (https://apps.ankiweb.net/) is the ability to create an input field there you can type in the answer and let Anki compare your answer with the answer from the card. Unfortunately this feature is not ready to use, you have to build the cards with this feature yourself.

Here is a little step-by-step guide you can follow to easily set up your own type of card:

Step 1: You have to create a new note type: Tools → Manage Note Types…
Clone the Basic Card Type

grafik

Step 2: Call it Input (or something simular)
grafik

Step 3: Check your fields. You should have Front and Back
grafik

Step 4: Edit your “Cards” and fill in the following:

Front Template:

{{Front}}
<br>
<br>
{{type:Back}}
<br>
<br>
<p style="font-size: 16px;">{{Tags}}</p>

Back Template:

{{FrontSide}}

You can edit the fields to your likings.

Done!


To use your new type of card you have to do:

Step 1: Add a new card and choose for the Type: Input
grafik

Step 2: Add some stuff. Like a command.
grafik

Step 3: Now then you want to test memorize the card, you have an input field.
grafik

grafik

When you click “show answer” Anki will check your answer you typed in. It’s up to you to choose the right intervall. You can say “easy” even if you typed it incorrectly.

grafik

Hope that helps. The Anki documentation is here:
https://apps.ankiweb.net/docs/manual.html#checking-your-answer

3 Likes