Field Dependency Examples
Easy Example:
radioButtonsField.Value=="No"
radioButtonsField.Value=="No" && radioButtonsField.Value=="Yes"
Use when you want to get the site tree status of the page:
EditedObject.Parent.NodeAliasPath.StartsWith("/Specific/location")
I will tell you how to setup the Custom registration form to show if the user name you enter is taken by another user without submitting the form. We extend the alternative form (cms.user.RegistrationForm) by an extra field (UserNameValidation -> Text -> Label) and we fill the Caption with “User name is already taken”. We configure the UserName field to “Has depending fields” and the UserNameValidation field to “Depends on another field”. The Visibility condition would look like this one below:
foreach (user in GlobalObjects.Users) {
if (user.UserName == UserName.Value) {return true;}
}
return false;