# How to shuffle fields in Card editor? \[JavaScript\]

**URL:** <https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338>\
**Category:** Help\
**Created:** [February 8, 2021, 10:59am UTC](https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338 "2021-02-08T10:59:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![niice](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@niice](https://forums.ankiweb.net/u/niice)\
**Post date:** [February 8, 2021, 10:59am UTC](https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338/1 "2021-02-08T10:59:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/9/9ef9b473164bad1af8c70ff8f343be8228c327e2.png)  
Dear good people,  
I’m new to Anki. I have more than 500 cards in this format. I have divided into these fields to work in Add-ons but unfortunately Add-ons stopped working. I’m trying to shuffle fields (for multiple choices) in front side of the card. To do this, I have tried HTML, learned the basics of JavaScript but could not figure it out. I have come to know about Fisher-Yates shuffle from different websites but wondering how to align with the fields.

Please give me idea to solve it.

Thanking you will not enough.

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [February 8, 2021, 7:19pm UTC](https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338/2 "2021-02-08T19:19:14Z")

</div>

Hi!

Sadly I don’t have the time right now to write a custom solution for you, but your use case could be solved by using the [Closet engine](https://ankiweb.net/shared/info/272311064).  
It’s an addon that provides tons of JavaScript functionality without having to know how to code (e.g. [creating multiple choice questions](https://closetengine.com/multiple-choice/creating#creating-multiple-choice)). Here you can [see it in action](https://youtu.be/9o7uriyIKnw?t=808). This is an old video. Today, you can easily switch between modes using a drop-down menu in the editor and insert commands using the default cloze-shortcut.

Mind you, getting it to work with your cards will take some effort, but in the end, you will have perfect shuffling, multiple choice support and clozes within non-cloze note types and cross-platform support.

Your notes could be converted into the right format by using a custom action with the [Advanced Copy Fields](https://ankiweb.net/shared/info/1898445115) addon.

---

<div class="post-metadata">

**Author:** ![vit](https://avatars.discourse-cdn.com/v4/letter/v/65b543/32.png) [@vit](https://forums.ankiweb.net/u/vit)\
**Post date:** [February 8, 2021, 8:32pm UTC](https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338/3 "2021-02-08T20:32:41Z")

</div>

I think you should consider the “Toxic Memory” affect →   
[https://supermemo.guru/wiki/Toxic\_memory](https://supermemo.guru/wiki/Toxic_memory)

---

<div class="post-metadata">

**Author:** ![niice](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@niice](https://forums.ankiweb.net/u/niice)\
**Post date:** [February 9, 2021, 7:19pm UTC](https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338/4 "2021-02-09T19:19:17Z")

</div>

Wow! I cannot thank you enough!! I’ve got the perfect one as expected. Thank you for being so generous. You made my day.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 5:14am UTC](https://forums.ankiweb.net/t/how-to-shuffle-fields-in-card-editor-javascript/7338/5 "2023-05-01T05:14:23Z")

</div>


