Is there an add-on to create drop down answers in the back of a basic card?

Hello!

I want to edit basic cards which I have already made where the back is a list of answers.

e.g.

Prostatic hypertrophy
Glaucoma
Hepatic disease
Bronchitis

I would like to be able to click on an answer and have an explanation come up (see images)

The way I have been achieving this so far is with the HTML but it’s time consuming.

e.g.

<details>
<summary>Why?</summary>
<p>It has local optima</p>
</details>

this is the result:

****Is there an add-on or something to make this easier?

You can use multiple fields (e.g. Answer1, Explanation1, etc.) or use custom syntax like answer1 [[explanation one]] then change it with JavaScript like this:

<div id=t>{{Front}}</div>


<script>
var e = document.getElementById('t');
e.innerHTML = "<details><summary>" + e.innerHTML.replaceAll("[[", "</summary><p>").replaceAll("]]", "</p></details>").replaceAll("<br>", "<br><details><summary>");
</script>
2 Likes

Is this the kind of add-on you are looking for?
https://ankiweb.net/shared/info/1990296174

Although it is a quite popular request, so there are many other card template and pure JS solutions here on the forum, for all kinds of use cases.

1 Like

Not quite, I’ll add some photos for clarity.