November Happy Hour will be moved to Thursday December 5th.

Set Default Value based on other property

Vote:
 

Hello,

In my page type, I have two fields Theme and Branding

I want to set value of Branding based on Theme on Content Creation.

I am trying to do this in SetDefaultValues method but it's not working

Any suggestions?

#208066
Oct 11, 2019 17:36
Vote:
 
#208070
Edited, Oct 11, 2019 20:00
JayeshM - Oct 14, 2019 17:20
Thanks, Ravindra .it worked. However now i need to delete the Theme property from Edit UI, how can I achieve that?
Ravindra S. Rathore - Oct 14, 2019 19:42
You can hide it for Editors by using
[Ignore]
public int HiddenPrimaryKey { get; set; }

[Display(Name="Readonly Property")]
[Editable(false)]
public virtual string ReadonlyProperty {get;set; }

http://www.jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-properties/how-to-hide-a-property-in-episerver-cms-and-how-to-make-a-property-readonly

http://joelabrahamsson.com/hiding-episerver-properties-from-editors

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2016/9/hiding-a-property-using-scaffoldcolumn/
Vote:
 

Hey @Jayesh

Here is a commonly referenced blog that demonstrates dependent drop-down lists.
https://world.episerver.com/blogs/Duong-Nguyen/Dates/2014/1/Country-Region-drop-down-lists-in-All-properties-mode/

Its important to note that newer versions of Episerver have changed things a bit, so please make sure you read the newer Comments in that Blog post, and refer to this Forum post. 
https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2017/4/linked-dropdown-does-not-display-value/

Hope this helps.

#208091
Oct 13, 2019 1:00
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.