surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.01k stars 782 forks source link

enable tagbox with hasOther to store more than one custom choice #6964

Closed masciugo closed 9 months ago

masciugo commented 9 months ago

Are you requesting a feature, reporting a bug or asking a question?

feature

What is the current behavior?

At moment using hasOther with tagbox let you add ONE custom choice. The possibility to add only one choice make much sense in a context of a dropdown (single choice). But when dealing with a multiple choices widget you may need to build your array of selected choices by adding more than one custom choice. Which is basically what select2 let you do with the tags: true option when used with multiple choices.

In my projects I would like to switch to the native solutions but I can't do it now because it would not be back compatible with my data as I have some saved array (built with select2 custom widget) like:

['opt1', 'opt3', 'myCustomOpt1', 'myCustomOpt2']

Instead, no backward compatiblity problems for all dropdowns.

Does it make any sense to you guys?

thankyou

andrewtelnov commented 9 months ago

@masciugo Do you mean a select2 functionality that allows to enter new values into the list?

Thank you, Andrew

masciugo commented 9 months ago

Yes I was recommended to use built-in questions instead of third-party ones but I miss that feature

andrewtelnov commented 9 months ago

Got it. We will discuss it on our weekly planning. I am doubt that we will do it this month, since we have a lot of functionality in our list to implement, but I agree that it is nice to have features. We have already discussed several times.

Thank you, Andrew

JaneSjs commented 9 months ago

Hello Everyone, Thank you for your ideas. Unfortunately, we don't currently plan to support user input choices for a Dropdpwn/Tag Box. We have the corresponding ticket in our list and may consider this enhancement in future updates of a SurveyJS Form Library. In the meantime, you may consider using a third-party Select2 component: View Demo.

Select2 allows you to add new options to a list. Enable the allowAddNewTag option to let users add new tags to a Tag Box Select2 widget.

Should you have any questions or require further assistance, please feel free to reactivate this thread.