Try our conversational search powered by Generative AI!

Predefind item list and casading values

Vote:
 

Hi,

I am developing a recipe module where I want users to add ingredients to the recipe. The flow is that users will chose an ingredient from a predefined ingredient list and then chose the unit associated for that ingredient.

For example if the user selects Salt from the ingredient list then he will have an option to select tea spoon or grams from the unit list. In case users selects Butter from the ingredient list then he will have an option to select tea spoon or Cups from the unit list. This is like cascading dropdowns.

How do I achieve this, what sort of data structure is required for this. Also does the Episerver CMS supports cascading dropdowns.

Thanks
Pankaj

#118499
Mar 09, 2015 7:06
Vote:
 

Hi,

Try following the solution mentioned in this blog post, Its old but may be relavent to you.

http://episervernz.blogspot.in/2006/09/advanced-property-development-with.html

You may also have to use Jquery.

/Raju

#118502
Mar 09, 2015 8:04
Vote:
 

The article above was written in September 2006, I am sure Episerver must have evolve a lot after that.

I am looking for any advance methods that are supported in 7.5 version.

Thanks

#118508
Mar 09, 2015 9:06
Vote:
 

Hi, Pankaj,

Please check out this post, it looks like that's what you are looking for: http://world.episerver.com/blogs/Duong-Nguyen/Dates/2014/1/Country-Region-drop-down-lists-in-All-properties-mode/

BR,

Marija

#118518
Mar 09, 2015 12:13
Vote:
 

Thanks Marija, the article helped me a lot. Just trying to figure out where all these files are located in Episerver installation.

Thanks

#118535
Mar 09, 2015 15:14
Vote:
 

Hi,

Thanks for the article Marija. I'm trying to accomplish something similar but all examples use hardcoded values (Country dropdown for example) and I'd like the content editor to be able to maintain these inside the CMS. In 6R2 we had the Select list (multiple selection) but this is not available in code first templates.

Does anyone have an idea what the best practice is in version 8?

Thanks!

/Mark

#122888
Jun 17, 2015 11:27
Vote:
 

Hi, Mark, you can do virtually anything with ISelectionFactory. 

Perhaps you can load items that are a part of tree or add these as categories and sub-categories...

Can you share some more details on what you want to achieve, perhaps it would be easier to help you with the possible solutions?

#122889
Jun 17, 2015 11:49
Vote:
 

Hi Marija,

What I'm building is a customer feedback form where a user can select an option form a list of radiobuttons:

Example:

RATING:

X Very good     O Good     O Bad 

I want these options to be maintainable in the CMS and not as in the code examples where they're prededined.

Hope this helps.

/Mark

#122891
Jun 17, 2015 11:53
Vote:
 

When you select one of the options, does any other property get reloaded like in the example above or you just need the value for the Rating property to be maintained from CMS?

#122892
Jun 17, 2015 12:00
Vote:
 

Now that I read again, you are sort-of rebuilding the XForm functionality? So the editor shouldn't be able to select any of the items, he/she should be able only to add form options?

#122893
Jun 17, 2015 12:05
Vote:
 

Hi,

No, there's no dependency on other properties. Just a list of radiobuttons or dropdown list.

And XForm is not an option due to the HTML rendered :(

/Mark

#122894
Jun 17, 2015 12:59
Vote:
 

Hi, Mark,

But the XForm is fully customizable (at least in MVC), have you seen this post:

http://www.eyecatch.no/blog/2013/09/full-customization-of-xforms-with-episerver-7-and-mvc/

I think it will eat you a lot of time if you try to recreate the functionality.

#122896
Jun 17, 2015 13:02
Vote:
 

Hi Marija,

Thanks! Looking the link you sent me :)

#122903
Jun 17, 2015 13:37
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.