Dynamic field type list

Dynamic field type list

joeltronjoeltron Posts: 1Questions: 1Answers: 0

Is it possible to have a field type that allows dynamically adding elements to a list (or array)?

I require a 'notes' list within a row that I can hit a + button and create a new note.

I thought about un/serializing an array and storing that in the database.

Thoughts? My only other idea is to create a separate table for the notes, but that seems overly complicated.

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Yes, the select field type allows this (as does checkbox and radio). The update() method of each of those field types can be used to either append a single item to the list, or replace all existing options.

    Allan

This discussion has been closed.