2sxc
2sxc copied to clipboard
Feature request: Min/Max number of items in lists
I'm submitting a ... [x] feature request
...about
[x] edit experience / UI
Current behavior
In an app, whether in a list enabled template, or a subentity field where users can add things to a list, users can add as many things as they want. Take a staff listing, for example. The content editors could add as many staff members to the list as they want. There is no min or max.
Expected behavior As a developer, I want to be able to set a min/max number of items in a list. For example, if I build a carousel app that has slides, and I want the content editor to only be able to add 4 slides at most, there would be a number field on the field settings where I can limit the number of items the user can add. For example, if I make an entity field and set it as a "Slide" entity and the user can enter more than one slide, I can also set "4" as the max number of slides.
It would also be useful if I could set the minimum number if the template is expecting a certain number of things.
Instructions to Reproduce the Problem N/A
Why change the behavior? I know this could be done by C# template, but that doesn't really solve the problem of guiding the user to enter the right amount of content.
This kind of feature could be super useful in a lot of scenarios. For example, if I wanted the user to be able to add only up to two buttons to a call to action that uses a button subentity. Or only up to 5 slides in a carousel. Or if there was an image gallery for before and after and I wanted them to add at least two images to a list, but not more than 2.
Your environment N/A
- 2sxc version(s): all
- Browser: [all ]
- DNN: [all |]
- Language: [any/all ]
Anything you would like to add The advantages to this compared to the template way of doing things is that there could be validation for the content editor for when they try adding too many slides.
@ajplopez I agree - this would be a great feature to help with a better (and more controlled) content editor experience. Great idea!
The UI would have to handle this, so my understanding of this wish is that it would be relevant for in-page editing (not entity-management in the edit-dialog). Correct?
Were you thinking of configuring this on the global scope (so eg. all uses of the Gallery-App) or per-instance (eg. on Contact only 3 slides, on products max 10, etc.)?
How would you imagine a min-setting would work? Since it's hard to force people to add data if they don't have more items (like more slides)?
Hi @iJungleboy , yes, that's correct. This would be a UI update for the developers to set min / max number of things. Of course, there would need to be validation messaging to the content editors to tell them why they can't add more things and to disable the controls to add more. I've updated the original post to include some screenshots.
At this time, my thinking would be that if I made a Swiper app (like a carousel), then it would apply to all instances of the swiper. So global.
A min setting would be less common than a max setting but I think still useful in some instances. For example, I have built a few "resource" apps where it's a listing of resources where they are tagged with "Search Tags" which is a sub-entity. It would be useful to force the user to select more than 1 tag but less than 3.
I can certainly see the use case for the settings to be global, but I think having the ability to scope per instance would be ideal.
This is a very old task, and I believe it's been resolved a long time ago, so I'll close it.
It kind of covers two scenarios: one is the in-page UI - which I believe was implemented (with max-only) about 1-2 years ago.
The new picker also supports min/max entries.
Whoa, really!? I will have to check this out.