2

I'm looking for a way to show or hide fields when editing an entry based on items selected.

I need to manage a list of businesses and my plan is to have a channel to hold them all. But based on the type of business, there are different pieces of information I need to collect.

  • They all have common attributes (Name, Description, Location, Phone, etc.)
  • There are many types (Restaurant, Recreation, Venue, etc.)
    • Many types have subtypes, but not all (Restaurant: American, Chinese, Casual)
    • Some have additional Info based on their type (Venu includes a list of meeting rooms with Names, Dimensions, Amenities, etc.)
    • Businesses can have more than one type (Restaurant, Venu)

What I'd like to do is be able to show different sets of inputs based on what categories are selected.

  • Check Restaurant
    • Reveal a list of Restaurant types, because that is relevant only to restaurants.
  • Check Venue
    • Reveal a table field type so you can enter a list of room names with corresponding features and amenities.

Is there a way in Craft, or is there a plugin that lets you run logic based on inputs to show or hide other inputs?

5

Check out the Reasons plugin... sounds like exactly what you need:

https://github.com/mmikkel/Reasons-Craft/

  • I'm too slow!!! – Brad Bell Jun 24 '15 at 0:10
  • Beat you by 14 seconds :) – Lindsey D Jun 24 '15 at 0:11
  • 3
    Perfect! Looks like exactly what I need. Winner gets the checkmark! – idahotallpaul Jun 24 '15 at 0:21
2

There's nothing native, but this is the highest requested feature on the feedback site!

And there is also this plugin, which might do what you're looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.