Copied to clipboard

Flag this post as spam?

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


  • Anders Brännmark 228 posts 280 karma points
    Jul 07, 2010 @ 11:03
    Anders Brännmark
    1

    Validation between two properties possible?

    Possible to validate input in documenttype properties that checks if one property is checked, dont require the other property? Havent needed this before, but now I have a case where I needed it. Anyone achived this?

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jul 07, 2010 @ 11:19
    Ismail Mayat
    1

    Anders,

    Only way i can of doing this is creating your own custom datatype which has both those properties exposed and then you can do check if one is filled hide the other.  Though you would end up storing both values in one field.  The other option is possibly with action handler so on save event hide the second property though you would probably need to inject some jquery in to hide the property see http://our.umbraco.org/projects/backoffice-extensions/protected-properties although no code there however i did do something where i needed to hide properties depending on user group and i used jquery to hide the property.  Take a look at this link you can download source of something I tried ages ago http://www.box.net/shared/ez1d47kxkb

     

     

     

    Regards

    Ismail

  • Anders Brännmark 228 posts 280 karma points
    Jul 07, 2010 @ 13:09
    Anders Brännmark
    0

    Thanks Ismail, will look into it.

Please Sign in or register to post replies

Write your reply to:

Draft