0

I have a component that uses a schema that contains a component link field with "Allow Multiple Values" checked. The components added via the component link have a drop down with states. If possible, we'd like to add a condition so that a state can not be added more than once. Is this possible?

1
  • So you don't want the linking component to not use linked Components with the same value? Or do the linked Component need to have unique values? If the latter, there's a "identification" option on Categories that ensures keywords aren't used more than once. The Components tagged with these keywords can't have the same name either.
    – Alvin Reyes
    Sep 26, 2014 at 18:36

1 Answer 1

2

Yes it is possible by implementing an Event System. Basically you will need to implement an Event Handler for the Component Save event for the Initialize phase, there you can perform the validation and throw an exception if the state has been added more than once

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.