Custom Content Type Manager
Conditional Drop Down Lists (2 posts)

  1. playboi14
    Posted 3 years ago #

    Hello Mate,

    Good plugin, I have been using it on a new site I am building and it works well.

    Just a quick question about future functionality, I see that you can define drop down lists and assign the values / keys to them.

    This works well overall, but I wanted to know will you be implementing any functionality in the future to allow for conditional drop down lists, for example:

    If we create one content type called "Cars" where I list different car information and then a secondary content type called "Spare Parts" where I want to list all of the spares parts we have, is there a way as such to include all of the "Cars" I have created in a drop down list for the "Spare Parts" type? As a visual example:

    - Nissan Skyline R32
    - Year Model: 1990
    - Description: This is the nissan skyline R32
    - Price: $2000

    - Nissan Skyline R33
    - Year Model: 1995
    - Description: This is the nissan skyline R34
    - Price: $5000

    - Nissan Skyline R34
    - Year Model: 1998
    - Description: This is the nissan skyline R34
    - Price: $8000

    Spare Parts
    - Part Name: Use Clutch
    - Part Condition: Use - Good Condition
    - Part Price: $500
    - Belongs to what car:
    (Here is the drop down list I want taking values from 'Cars')
    - Nissan Skyline R32
    - Nissan Skyline R33
    - Nissan Skyline R34

    Somewhat confusing, and I am sure very difficult to create as there would need to be a new type defined that takes its value from another predefined type and field.

    I hope to hear back from you :P

    Kind Regards


  2. fireproofsocks
    Plugin Author

    Posted 3 years ago #

    No plans to do that, and here's why: 99% of the time, the conditions are so customized that it's prohibitively difficult to normalize the controls required. I mean, seriously, defining such a ruleset would make a rocket launch look trivial, and can you imagine normalizing the Javascript logic required? It's all possible, I'm sure, but holy smokes, without a huge budget, I wouldn't touch that with a 10 foot pole. Having written flow forms for insurance companies, I know that the car/model/options flow gets insane. As soon as you get into flows that complicated, WP itself becomes more laborious as a platform.

    YOU can, however, edit the manager HTML used to generate those fields and you can add your own javascript. See the http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CustomizingManagerHTML All the custom fields use formatting strings (i.e. templates, or "tpls") to format their output, and you can define your own custom HTML strings to handle your own customizations -- just add your own javascript to taste. Some users have customized these to do EXACTLY what you are asking about: responsive UI. It's just unlikely that stuff like that would ever make it into the core.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Content Type Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic