Home Forums Backend Issues (wp-admin) How to create a new input field type as an array? Reply To: How to create a new input field type as an array?

  • Old question and you’ve probably either found a solution or moved on.

    For others looking at this type of work, there are several fields in ACF that store arrays. There are also other fields that return arrays of information but do not actually store those arrays. There are also fields that are a combinations. For example the Taxonomy field when set to allow multiple selections stores and array of Term IDs in the database. The field can also be set to return Term Object. These objects are not actually stored in the DB, it still just stores the IDs and the terms are constructed by the format_value() method of the field type.

    My first step in building a new field type would be to look at the existing field type coding, especially the ones that do something similar to what you want to do, and then use what you find as an example while building the new field type.