Home Forums General Issues Using select field to display different information


Using select field to display different information

  • Hello!

    Basically, I have my website set up so that each category page is a profile for different companies. I want users to be able to choose between two different formats of information, with the information changing depending on their choice. The field is called company_history_format with the choices being interactive_timeline or text_timeline, and depending on their choice either the field interactive_timeline or text_timeline will show up. This information also will have to take into consideration the category ID. An example of the page is here, with the “Company History” section being what I want to be changeable.

    Thanks so much, and I absolutely love ACF!

  • This isn’t really a question of ACF but rather your theme?

    If you want a select dropdown in the frontend which will change the content of the company history you’ll need to code in a select dropdown yourself and probably hook it to an ajax function which alters the content!

    If you want to be able to select between different layouts in admin when you create the post you can use the conditional logic to display different input fields in the admin depending on which choice you (or who ever is administrating the site) choose from a select created with ACF. Then it’s just a matter of doing a if statement with php in the theme where you change layout depending on which select value they chose in admin.

    Either way this isn’t so much an ACF issue as it’s a regular theme dev issue.

  • Thanks so much for pointing me in the right direction mate! Did some more research and figured it out if ya wanna have a look!

    By the way that whole page is pretty much all ACF, absolutely awesome plugin!

  • Glad you worked it out! Looks good!

    Yeah ACF is friggin awesome, saves so much time in development.

    Are you using a jquery plugin for the interactive timeline? If so could you post a link to it? Seems like a nice thing to keep for future reference 🙂

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

The topic ‘Using select field to display different information’ is closed to new replies.