Support

Account

Home Forums Backend Issues (wp-admin) Multiple Values, Same Field

Solved

Multiple Values, Same Field

  • I’m probably overthinking this, but I’m trying to figure out the best way to assign multiple values to a single field. There’s a good example here, but let’s say I’m creating a book review blog and I want to associate book metadata with each review post. Most of the custom fields would have single values, but the “author” field would occasionally need multiple values so that, in the case of a book like Good Omens, written by Terry Pratchett and Neil Gaiman, I’d be able to link it to both Prachett’s and Gaiman’s respective author indices.

    Does that make sense? What am I missing here?

  • ACF does not store values exactly the same way that WP does and you can’t store multiple values this way. You would need to use one of the relationship fields or something like a select/radio/ceckbox field. These are the only ways that ACF will let you store multiple values for a field.

  • Thanks. I thought that might be the case, and I was trying to see whether checkboxes would work. I’d prefer to add the values on the fly, rather than go into ACF and add values each time I needed to, as per the example, add an author.

    I appreciate the answer.

  • For me, in this case, an author would be another CPT and I would use a relationship field.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Multiple Values, Same Field’ is closed to new replies.