Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locking/Archiving options #5979

Open
synth opened this issue Oct 23, 2024 · 3 comments
Open

Locking/Archiving options #5979

synth opened this issue Oct 23, 2024 · 3 comments
Labels

Comments

@synth
Copy link

synth commented Oct 23, 2024

Is your feature request related to a problem? Please describe.
The problem is that if someone changes the option name or deletes an option, the SurveyJS graphs and tablulator won't show responses for those options.

Describe the solution you'd like
We want to implement two things:

  • prevent edits to an option's "name". (aka id)
  • add an "archive" button, so options can be archived so they are no longer visible in the UI and can't be chosen in a response, but will still show up in reports.

Describe alternatives you've considered
I can't think of any.

Additional context
In general, we're trying to handle the issue of changes to a survey and being able to report across survey template changes. Being able to prevent changes to the option's linked key "name" and being able to archive options will be a great help.

We've looked at #1107 which describes custom adorners and custom properties for questions. We think we can implement an archive button for questions using these, but we also want to implement this idea for options.

We would want this globally for all options that have or could have a name/text pair ("choices"?) where the "name" is what links to the response key.

@andrewtelnov
Copy link
Member

@synth You can use creator.onCollectionItemAllowOperations to disable deleting your old choice item.
Your Creator user should make set "false" visibleIf property to hide it.
As an alternative, you can create a custom boolean property (deleted) for itemvalue. Your Creator user will use set it to true to delete the old choice. You will remove them from JSON or Survey Model before rendering the survey runner and do nothing for Dashboard.

Thank you,
Andrew

@synth
Copy link
Author

synth commented Oct 23, 2024

Amazing, thank you for the fast response! Appreciate you and this amazing tool! We'll try this out and let you know if there are any followups q's.

@andrewtelnov
Copy link
Member

@synth Please let us know if you need help with it.

Thank you,
Andrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants