Home Forums General Issues Structuring Data for later comparison


Structuring Data for later comparison

  • I’m working on a site using ACF that allows users to create “profiles” and then seek other users based on that data. I’ve got a custom page type to display it, a front end form to create them (currently dumps every form set at once, but that works while I develop), and a few taxonomies for key portions. So far so good, but there’s one section that is giving me pause because I’m not sure of the best way to leverage ACF to structure the data.

    Users can select “categories” of interests, then within those categories view a list of activities. Those activities can be marked “interested”, “not interested”, or “favorite”. Think “Outdoor Activities” and within it “Hiking, fishing, rowing” etc. May be relatively large lists.

    Simply creating a formset with radio buttons, manually adding each of these activities, seems cumbersome. Plus the data is not returned well-structured. It seems to make sense to create a taxonomy for the category and add the interests within, but 1.) I don’t know how to let the users mark the options within that framework, and 2.) I feel like I’m stretching the intentions of taxonomies.

    I’m relatively new to ACF, so the answer may be super simple, or lie in an add-on, V5, or somewhere else I haven’t looked. I’d appreciate any feedback from anyone who has tried a similar setup, or is generally more knowledgeable than I am.

  • I’m not sure if ACF has a field like this ( not that I could see in the basic version anyway ) but this type of thing would work best as a Non Hierarchical Taxonomy with a Select2 type field. Think post tags: it’s searchable, you can assign multiple, and it’s listed out in a formatted easily manageable input for the user to digest. You can control whether the user will be able to create new terms or only select from existing terms. You can populate with AJAX and give them a populated list of options. It seems to make sense for the usecase described.

    Terms is pretty efficient when querying because of the relational tables already setup. A custom table and query may be more efficient but would also be more work to setup.

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

The topic ‘Structuring Data for later comparison’ is closed to new replies.