Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yotam Vered 6 posts 26 karma points
    Jun 30, 2013 @ 15:34
    Yotam Vered
    0

    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

  • Charles Afford 1163 posts 1709 karma points
    Jun 30, 2013 @ 19:42
    Charles Afford
    0

    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 :)

  • Yotam Vered 6 posts 26 karma points
    Jul 01, 2013 @ 09:51
    Yotam Vered
    0

    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.

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jul 01, 2013 @ 12:16
    Jeroen Breuer
    1

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jul 02, 2013 @ 13:53
    Jeroen Breuer
    0

    Just a quick bump because notifications didn't work. See my previous post :-).

  • Yotam Vered 6 posts 26 karma points
    Jul 03, 2013 @ 07:54
    Yotam Vered
    0

    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. 

Please Sign in or register to post replies

Write your reply to:

Draft