Hello,
I'm trying to disable deleting choices on question in the survey creator if the number of choices is less than three. I'm using the function from https://surveyjs.answerdesk.io/ticket/details/t6822. But it only works with the initial rendering of the survey creator. Is there a way to remove the ability to dynamically delete responses?
Issue
T14805
Visible to All Users
Hello,
Thank you for reaching out to us. The creator.onCollectionItemAllowOperations event should allow developers to prevent choice deletion. However, it appears that it doesn't work as expected. I forwarded the corresponding issue to our developers for further research: Limit the number of minimum choices using the creator.onCollectionItemAllowOperations event doesn't work. Please look forward to our updates.
Hello,
To help us consider the best option to handle this, please additionally clarify whether you wish to limit the number of minimum choices for all questions which may contain choices (e.g., Radiogroup, Dropdown, Matrices), or for specific question types.
I look forward to your reply.
Thank you so much!
I wish to limit the number of minimum choices for all questions which may contain choices
Hello,
This PR adds
minimumChoicesCount
property into creator and creator options. You can set it to 3, for example, to disable deleting any choice item if there are only 3 choice items.It is very likely that the PR will be merged into master branch and this functionality will be available in the version we will release next week.
Thank you,
Andrew
SurveyJS Team