Hi, I need to turn multiline input element into multilesect.
This
Into this
I thought I would achieve it by connecting to database. I was wrong. And I can’t find any more info about it that would help. I found basically just how to let user input their options.
But I need to make it dropdown showing specific database
Can you explain what you are trying to do exactly?
A multiline input is not a dropdown. What do you want to do exactly? When user focus a multiline, this bring a list of item that you can insert in the multiline input and continue to type other text?
You want a searchable dropdown?
If you want to have a searchable dropdown:
A) Use single line input (there’s no reason to use a multiline) and a RG that will filter results according to input value. And the RG will have selectable list
B) Use a plugin. There’s different dropdown plugins that have a searchable features (Selectize, Select2…)
If you want to have a dropdown that open when input is focused and want the user to be able to type text and select an option to select in the middle of the text (an emoji for example), you need to use a plugin like Insert at caret position with a dropdown or a RG.
I have this as a part of my job assignment and I am required to use multiline.
EDIT.
I did some changes and found some details. Question is to change it to multiselect as seen on a screenshots above.
Just to mention I have changed dropdown for multiselect everywhere it was written.
I already tried to help you in another post, but I think that our MAIN issue here is the fact that we don’t know what you are building (or what you are trying to do). We already understood that this is an assignment for a job, but what they asked you to build? Because looking into your editor and database, nothing makes sense.
I have been following your journey toward getting this job since you joined the forum a week or so ago, @jirizboril, and I’m pulling for you, friend, but it’s damn near impossible to make any sense out of how you are describing this assignment they have given you.
I can’t imagine someone is asking you to turn a multiline input into a multiselect dropdown, and if they are, well, they shouldn’t be. That being said, if you really want to do that, you can set the multiselect’s choices source to the multiline input’s value split by a space character, and that will give you a multiselect dropdown where every word in the multiline input is now an option in the dropdown.
Again, though, nobody should be asking you to do what I have described above because it doesn’t make any sense. For future posts, you might consider posting a screenshot of the actual assignment so folks can see firsthand what you are being asked to do. As to whether or not that is an ethical way to approach an assignment you are trying to complete for the purpose of getting a job, well, I will leave that for you and the company to which you are applying to judge.