If I understand correctly...the code sample in the link you posted is for creating dependancy between 2 fields on a page for a surfer who fill a form. What I want is creating dependencies between 2 properties of a document type for the content editors while creating the page.
Add dependent property in document type
Hello,
Is it possible to add a dependancy or relation between properties of a document type?
The scenario I mean is something like:
First property is "umbracoNaviHide" - True/False
Second property is "menuIcon" - Media picker
Is it possible to make the second property mandatory if First property is "True" and NOT mandatory if first property is "False".
This is just an example I can think of many situations where a property is dependant on the value of a previuos one.
Thanks,
Yotam
Yea this would be possible, but you would need to do some custom developement i guess.
You could get the two properties
Check if the rule has passed or failed
Pass back a result
Render the result.
Hope this makes sense. Never done it on Node Properties but it will be possible. Charlie.
Look for Custom Node Validation Umbraco :)
Thanks,
I was hoping the solution would be something "out of the box". This seems rather trivial scenario...
I'm still a beginner with Umbraco and don't want to mess with the code (yet) if I dont have to.
Hello,
The best solution is to create a custom datatype which has both properties so you can add dependency in there. More info here: http://our.umbraco.org/forum/developers/extending-umbraco/7085-Linked-mandatory-datatypes
Jeroen
Just a quick bump because notifications didn't work. See my previous post :-).
Thanks Jeroen.
If I understand correctly...the code sample in the link you posted is for creating dependancy between 2 fields on a page for a surfer who fill a form.
What I want is creating dependencies between 2 properties of a document type for the content editors while creating the page.
Or maybe I got it all wrong?
Thanks.
is working on a reply...