Why does this appear?

Every time I type a wrong answer this message appear. Anyone knows how to fix it?

This means that there is bug in your card template.

To fix it, you need to show us your card template. To get to the card template, you can click “Edit” in the bottom left corner, then click the “Cards…” button, and then select “Back Template”. You can paste the content of the text field here, which should help us fix this bug.

1 Like

Here it is:

"{{FrontSide}}

<hr id=answer>

{{Baksida}}
<br>
<br>
{{#Extra 1}}
Alt:
{{/Extra 1}}
{{Extra 1}}

<script>
    ignoreCases();
    function ignoreCases() {
        var typesBad = document.querySelectorAll('#typeans > span.typeBad');
        var typesMissed = document.querySelectorAll('#typeans > span.typeMissed');
        for(var i=0; i < typesBad.length; i++){
            if(typesBad[i].innerText.toLowerCase() == typesMissed[i].innerText.toLowerCase() || typesMissed[i].innerText == "."){
                typesBad[i].setAttribute("style", "background: #0f0;");
                typesMissed[i].setAttribute("style", "background: #0f0;");
            };
        };
    };
</script>"

The forum editor evaluates the HTML if you don’t explicitly tell it not to do so. There might be a lot of stuff (scripts etc.) we can’t see here.

Please wrap your template in triple backticks like this

```
Template
```

Then, we’ll probably be able to help you.

1 Like

I have fixed it. You can see it now I think. Btw I deleted the script and it seems that the problem is fixed. Do you think this is a good solution?

This seems to be a script for “type in the answer” notetypes. Specifically, it makes the error-check case-insensitive.

If you don’t have any use for it, sure, deleting it is a good idea :+1:t2:

1 Like