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?
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
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?
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
Thanks Ismail, will look into it.
is working on a reply...