I’m doing a book database. Obviously books have authors. These authors have not just written a book than I have on file.
How can I do to have in the form a drop down box with the author to select for the book by insert on database?
I thought to relate the archive books with that of the authors.
What is better to use taxonomies, relationship field types or repeater fields?
Thanks and sorry
I’m a bit new in ACF
I’m afraid I don’t understand your question, so forgive me if I’m wrong.
If you want to add the authors of the books, I believe the best thing to do is to use a custom post type for the authors and then you can use a post object field type to set the author. By using a custom post type, you can specify more fields and custom query in the future.
Also, if a book has more than one authors, you can set the “Select multiple values?” option on the post object field or use a repeater fields for the authors.
I apologize if I messed up
I would like to store books by choosing the author via a selection box.
This means, for example, that the same writer who wrote more than one book may appear on more than one record books.
Joseph Conrad wrote Lord Jim and The Shadow Line. If I put on file the book Lord Jim, as a writer I have to put Joseph Conrad.
The same thing must I do to store The Shadow Line.
But I think it is not necessary to enter another time Joseph Conrad into the book data. In fact, if I have the authors archive, Conrad is already registered and you only need to choose him from a selection box, but will have to be dynamically linked to the archive authors.
This is what I would do and would like to know how to do it using ACF.
Like I said before, I think the best way to achieve this is to create a custom post type to store the authors. That way, it will be more flexible and easy to manage. You can use a plugin like Custom Post Type UI to create the custom post type. After that, just link the books to the authors by using the post object field type.
I hope this makes sense 🙂
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users