1

I have a Drop-down List in one of my schemas and I'm using Categories to fill it. It is a required field and I have the "Default Value" set to nothing. I want the value when the component is created to be set to empty so that it forces a user to make a change. Currently it's selecting the top one and this effectively allows the user to skip it because there is a value in it.

Is there a way to make it start blank so that the mandatory validation will work?

1
  • 1
    What version of Tridion are you trying to do this on? – Nickoli Roussakov Apr 20 '20 at 14:32
2

I've just checked this on my local (Tridion Sites 8.5) machine and I get the same behaviour - If I make the category field mandatory then it automatically selects the first value in a new component.

Some possible ways around this would be:

  1. Make the field a 'Select Box', rather than a Dropdown, and don't allow multiple values. This may be awkward to use if you have a long list of keywords though.

Mandatory select field from category values

  1. Write a GUI extension to set this field to blank when the component is first created.
  2. Create a dummy first keyword, set this as the default and use some events system code (or a GUI Extension) to ensure that it's changed.
  3. Have another mandatory checkbox field where the editor can confirm that the selection is correct (this seems a bit hacky).

Hope this helps!

8
  • 2
    I'd write a quick Event System method on pre-save to throw an exception with a message. – Nickoli Roussakov Apr 20 '20 at 14:48
  • @NickoliRoussakov - Certainly easier than writing a GUI Extension! :) – Jonathan Williams Apr 20 '20 at 14:50
  • 1
    Yes, I agree! Maybe one for the Ideas site! – Jonathan Williams Apr 20 '20 at 14:58
  • 1
    Please see my post on how GUI extensions are remaining for the current UI. The new additional UI will not introduce GUI extensibility just yet, but when available in a future release it will (must) be different than Anguilla extensions. I'm asking implementers and partners to be please be clear on the distinction. – Alvin Reyes Apr 21 '20 at 19:59
  • 1
    Feel free to submit the idea on SDL Ideas for Tridion or possibly as a bug with Support. Currently, for the new editorial experience for (under development) for Sites 9.5 mandatory drop-down fields are not set automatically. A bug submission or even better, an idea on SDL Community can help us consider these kinds of enhancement requests into the product. Most UI improvements will mainly be considered for the newer UI. – Alvin Reyes Apr 21 '20 at 20:15

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.