6

I'm hoping that there is a way to create a dynamic choice list when the user is filling out the component form based on a schema on the Content Manager side. Example:

I have a drop down for Category lets say the options are "fruit, cereal, soda".
once the category is chosen, I'd like the next field to change "available values" based on the chosen category. For example if they chose fruit, I'd like the next drop down to have "Apple, Orange, Banana" rather than having a 'sub category' that has everything, which would make the drop down very large.

Any advice would be greatly appreciated, thanks!!

2

It looks like you are trying to achieve this on Content Manager side (That is, while creating a component).

If yes, it is Out-Of-Box feature.

But If you want to achieve this on Content Delivery side then you can do using Taxonomy Filter

Update:

After you confirmed that you are doing this on CM, I have a thought that you can do something similar based on below option

If you want to select a keyword from the last dropdown then implement Custom URL on the Category field. Here Custom URL will load a page which

  1. display a Category dropdown
  2. On select of category, show the sub-categories
  3. On select of sub-category, add the keyword to the field

Another update with some code: put this on your submit button:

var fields = window.dialogArguments.getFields();
//console.log(fields);
if (fields && fields.length > 0) {
    fields[0].setValues(["TRIDION"]);
}
| improve this answer | |
  • Yea, I'm trying to do this on the content manager side during component creation. would you happen to have a link to the documentation on this? – Daryl H Jun 27 '13 at 16:02
  • @darylh683: Updated the answer. – Siva Charan Jun 27 '13 at 16:38
  • Siva if I do that, then I wont be able to store the sub-category fields in their own XML element, right? – Daryl H Jun 27 '13 at 17:45
  • @darylh683: Yes. Here you will store only, final selected keyword from the last dropdown. – Siva Charan Jun 27 '13 at 17:48
  • and if I also wanted to save the main category, I'd probably have to put some kind of delimiter and just parse the string? – Daryl H Jun 27 '13 at 17:49
2

For an out-of-the box approach, consider nested keywords and the tree option.

Users would navigate the main (possibly abstract) options and then pick an individual keyword.

It's not two drop-downs, but it achieves the same goal of simplifying the author's selections.

Otherwise you would need a GUI extension. I believe there's also an suggestion on Tridion Ideas that you could vote for, if interested.

| improve this answer | |
1

Welcome to the community.

You may want to give a look to this same question asked quite a few time back: How To Map Two Categories To Dropdowns

I hope this will answer your question.

| improve this answer | |
  • Thank you, I'll check it out. when searching for this already I was married to the word "dynamic" which was in all my searchs :) – Daryl H Jun 27 '13 at 15:29
  • I think Daryl is looking from the Content Management side, not Content Delivery. Is There a way this can be done on the schema during component creation? – Trevor Bartlett Jun 27 '13 at 15:33

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.