• Resolved starapple

    (@starapple)


    I’ve designed a questionnaire to collect information and present the collected data as first person responses.

    For the life of me I can see no automated way to access then loop through the data in key/value pairs so that I can present it as in the example: (key:) “I was born in (value) 1984.”

    It seems as if I need to retrace the same tedious process of creating the input fields to retrieve the data in the cells.

    Is there a function to get_ the_post( $post->ID ) and for each field echo the result?

    Everything I’ve found through searches suggest writing lines for the approximately 30 questions and styling them individually.

    I bought a lifetime licence back when it was $25 and the prospects sounded promising until I had to be doing so much manual writing, it was tiresome and that project withered away.

    But it’s AI days now and I thought things had changed so I dusted off my account and downloaded the latest version, created my form with a custom post type and stored data perfectly only to be fighting to display the results.

    Help! please by pointing to the “how to” docs.

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter starapple

    (@starapple)

    There is such a function, get_field_objects(), and if you search long and hard enough, you will find it here: https://www.advancedcustomfields.com/resources/get_field_objects/

    Apologies to ACF. I found it on the ACF site while reading a post by someone who, like me, felt this feature didn’t exist so he wrote a function to accomplish the end.

    Much of the problem with using a lot of opensource software is the haphazard documentation. That, an often end-users aren’t considered sufficiently in writing these docs or features added on request don’t get into the document flow.

Viewing 1 replies (of 1 total)
  • The topic ‘Can one loop through an ACF post for key/value pairs?’ is closed to new replies.