Idea Delivered

This idea has been included in SDL Tridion Sites 9.5.

Do not show have visible non-mandatory embedded schema's (even when fields inside that embedded schema are mandatory)

Just like in XML where certain elements can be non-optional where child elements in itself can be mandatory again.

You would like to be able to have this same behavior and editorial experience from the CME. By only showing a + instead of the complete embedded schema for non-mandatory fields.

item block embedded field that's non-mandatory with mandatory embedded fields

(in the screenshot above "itemblock" was a nonmandatory field.)

In our case because of mandatory items in the embedded schema, there is no way to safe this component. Because the editor will force you to enter a value for Itemblock > Title etc...
Have read a couple of stack-exchange messages regarding this, they came with "solutions" like: change the type of the fields or make the fields non-mandatory of the embedded schema itself.

This is not actually a proper solution. The solution and idea would be to only add these parts when they are needed. Besides this, it would also cleanup the CME from clutter you would see on non-mandatory fields.


Regards and hopefully we can look forward to having this in a next release somewhere.

Edit (Alvin): fixed image

  • Indeed, it should be possible to save a Component with an optional embedded field, even if the embedded Schema contains mandatory fields.  On the other hand, it may be annoying for users if they explicitly have to add a value for each optional embedded field.

    Would it be an acceptable solution if the optional embedded field initially has a value, but the user can explicitly remove this value if not applicable (i.e. if the trashcan button would be enabled in above screenshot)?

  • Are these the questions you're referring to?

    tridion.stackexchange.com/.../mandatory-embedded-schema-field-not-throwing-exception-when-empty-in-sdl-tridion

    tridion.stackexchange.com/.../can-an-optional-embedded-field-be-omitted-even-when-a-mandatory-dropdown-field

    I like the idea but there might be catches. Read on. :-)

    I can see how we might change the UI to collapse/hide/not show the embedded fields when the field itself is non-mandatory, but I believe we'll still have an issue with mandatory fields within the embedded schema that have a default value (forcing the editor to fill out the rest of the mandatory fields). Would you prefer mandatory fields to maybe not have a default value? Or is hiding the fields more important?

    Or is the preferred logic to let editors save a Component where mandatory fields have values in an embedded schema that's optional itself (or specifically on mandatory fields that have a default value that editors did not explicitly set or change). The save would maybe "throw away" these values so the XML is valid?

    In the other direction, maybe schema editors would prefer the mandatory behavior of fields to be controlled from the context of the embedded schema selection, rather than in the embedded schema itself (I'm not sure on feasibility here, though).