Try our conversational search powered by Generative AI!

Set Default Value based on other property



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?

Oct 11, 2019 17:36
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
public int HiddenPrimaryKey { get; set; }

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

Hey @Jayesh

Here is a commonly referenced blog that demonstrates dependent drop-down lists.

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.

Hope this helps.

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.