Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:47:56+00:00 2026-06-06T17:47:56+00:00

I develop the site with Day CQ5 and was faced witha problem. I’m creating

  • 0

I develop the site with Day CQ5 and was faced witha problem.
I’m creating a component, and the dialogue for it. I use in the dialog for the component element “multifield”, which contains several elements “pathfield.” How can I set a specific number of elements “pathfield” and remove buttons “+” and “-“?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:47:58+00:00Added an answer on June 6, 2026 at 5:47 pm

    I’ve come across this exact problem this week 🙂

    It seems that by default you can’t limit the number of items the editor can enter. To resolve the issue, I created an overlay of the Multifield.js placed at

    /apps/cq/ui/widgets/source/widgets/form/MultiField.js
    

    I’ve added a check for a ‘limit’ property set on the fieldConfig node under the multifield. If present & not zero, it will use this as the max number of fields a user can add.

    Don’t want to get into copyright issues by posting the full overlay, but the changes I made where as follows:

    In the constructor (line #53), add in a check to get the value of limit from the fieldConfig node:

    if (!config.fieldConfig.limit) {
            config.fieldConfig.limit = "0";
    }
    

    In the handler for the “+” button (line #71) change the function to the following:

    if(config.fieldConfig.limit == 0 || list.items.getCount() <= config.fieldConfig.limit) {
        list.addItem();
    } else {
        CQ.Ext.Msg.show({
            title: 'Limit reached',
            msg: 'You are only allowed to add ' + config.fieldConfig.limit + 
                 ' items to this module',
            icon:CQ.Ext.MessageBox.WARNING,
            buttons: CQ.Ext.Msg.OK
        });
    }
    

    Rather than removing the buttons, I’ve just created a pop-up to inform the editor that ‘N is the max number of fields allowed’.

    Simple change, but does the job! Hope this is of use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I develop the site with Day CQ5. I am developing templates, components, and pages
I'm trying to develop a site using Zend Framework, but i have a problem:
I recently develop a site and I noticed that when I use the scroll
I have to develop a site which has to accomodate around 2000 users a
I want to develop a site that will allow be to publish information to
I need to develop a site on Drupal 7. I have some content types
I am trying to develop a site using pinax. To index the models using
I'm trying to develop a site that recommends items(fx. books) to users based on
I am using MAMP to develop a site and I wanted to know if
I'm currently trying to develop a site which queries text information. I already have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.