I've got two custom properties (both dropdowns) in my page type and I'd like to make the second one forced (value must be entered) if a certain value is selected in the first one. Any ideas on how to do this?
Easiest would be to create a custom property that uses both of these custom properties and add the necessary validation logic based on that. Another approach is using FindControl method to find the other property and inject the necessary validation based on the value (could also use PropertySettings for this).
Hope this helps.
I need to be able to use them seperately so perhaps the FindControl would be the easiest way to do it then. Thanks!
Here is a post about validation in custom properties: http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2008/10/Validation-of-property-values/, might be easier for you to hook into the Save page event and add the validation logic there (see http://blog.bigfinger.se/2010/4/26/simple-validation-of-propertyvalues-in-episerver-cms-6.aspx for an example).
That save page event was great advice. Thank you!!