Adding dynamic number of options

I’m adding a feature to a web app which allows for multiple options. It is so an admin can create a question in the database and then add any number of options which will then be displayed to users as checkboxes.

So I’m thinking of having an input field where they type in the option and then a button to add another input field so they can enter another option. Each one will have a delete button to remove it again.

What’s the best way to do this?

I was thinking of using a datastore for the options and then sending them to SC to store in the database as a JSON field.

Is that the best way? Or would a tagify be better suited?

On further thinking, I don’t need to use the datastore. I can use an array instead?

Tagify would work well. I guess it depends if you need any extra data.

I’ve recently done similar with creating lists and options. I found the form repeat is great for this. The sortable option for form repeat would make it very easy to set or change the display order of the checkboxes for example, or you could add an option to enforce an entry. If you need options beyond just a name I’d say this would be the way to go.