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?

Community Page
Last updated: