This article covers a Bloomreach Experience Manager version 11. There's an updated version available that covers our most recent release.

15-01-2021

Limit the Number of Values in a Multiple Value Field

Rationale

The CMS supports document fields of "type"  multiple. By default, the CMS imposes no limit on how many instances of such a field an author can create inside a single document. There may be a need to set an upper limit to the number of instances of this field inside a single document, e.g. pick no more than 5 related articles for a single news item document.

How to?

You can only configure an upper limit through the Console. Navigate to  /hippo:namespaces/<project-name>/<document-type>/editor:templates/_default_/<field-name> and add a property of type Long, called maxitems. The numeric value defines the upper bound on how many instances of the field you may create inside a single document. Such an upper bound is supported for both property-based fields (e.g. fields of type String) and child node-based fields (e.g. compound fields such as Link). 

Screenshot

Below screenshot shows how an upper bound of 2 or 3 look in the CMS Document Editor. Note how the upper bound is indicated and, when reached, there is no more  Add button.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close
    Back