Suggested tags inpu

I need to create an input value to add a tag to an article (like wordpress) and I need to have a repeating group under the input line that appears when I’m typing in the line to suggest the existing tags to add.
Could someone help me?

Hi there, @quidsicurezza… is there a reason you wouldn’t be able to use Bubble’s multiselect dropdown plugin? If you haven’t come across that plugin before, you might want to check it out because it should give you the ability to add tags to an article without having to use an input and a repeating group.

Hope this helps.

Best…
Mike

1 Like

Hi
The dropdown isn’t useful to me because I can’t add a tag that isn’t already in the list

Oh, no… you’re going down the path of letting users add their own tags, eh? Ug… good luck with the mess that is going to create.

Can’t you just use a searchbox? I suggested the multi-dropdown because I assumed you would want a user to be able to select more than one tag. If you are trying to use an input element, then you must not care about that, so it seems to me that a searchbox could work because users could see existing tags or add a new one if the existing ones don’t meet their needs.

In order to add the tag, however, I have to create another input field, can’t I have a single one that serves both to search for them and to add them?

Unless I have completely misunderstood what you are trying to do in this thread, you don’t need another input field. You could use the An input’s value is changed workflow event and add the selected tag to the article when searchbox’s value is changed or you could make it more explicit by adding a button or an icon next to the searchbox that the user can click to add the selected tag to the article.

With this solution however the content of the input field must be identical to the tag, but if I type the first few letters of an existing tag it doesn’t compare the suggestion on the repeating group
I’ve made a video with an example
ezgif.com-gif-maker

Okay, I’m officially lost. If you use a searchbox element, you don’t need an input and a repeating group. Anyway, I will shut up now and let someone else help out here because I clearly don’t know what’s going on.

With a searchbox you don’t need the repeat group, but as far as I know with the searchbox you can’t add an item by typing it as input, thanks anyways

Yes, you can, and I guess that’s why I’m confused here… but I digress.

If you are convinced that it can, could you explain to me how?

I don’t know the solution, but I understand what you want!
It’s like adding tags on Instagram … as you type, a list of suggested existing tags appear and you can simply tap on one of those to autocomplete or, if nothing appears that is what you want, then you just keep typing and hit enter to create a new one. The thing that makes this difficult on Bubble is using the content of the search box to create the new tag without having to re-enter it in another input. The search box essentially has to serve two functions, to search and to create, and I don’t know how to do that!

My solution is not perfect, I still need it to check for upper and lower case (right now it’s treating Hey and hey as two separate tags) but maybe something like this?

If your input doesn’t match a result in the database it has a “fake” option there but really it creates and adds it on the spot

@philiposborne @quidsicurezza

This was just put together and needs work still and it uses the fuzzy search plugin which I was trying to avoid

1 Like

I’m still not sure why you can’t just use a good ol’ searchbox. Here is an example where I have a Tag data type with a field called label and an Article data type that has a field called tags that is a list of tags. I have a group on a page that has a Type of content of Article, and the data source for the group is just the first item in the Article data type. Finally, I have a searchbox in the group, and the searchbox is set up like this.

Note that the box to allow entries not in the list is checked.

I am using two workflows to add a selected tag to the group’s article. The first workflow looks like this.

The second workflow looks like this.

Anyway, that’s what has been in my head this whole time for this thread, and I just got the time to make an example now. Maybe I am still missing the mark here, but if you are simply trying to search for an existing tag or create a new one and add it to an article, what I am showing does exactly that.

3 Likes

I forgot the searchbox can do more than pick existing things :+1:

Thank you both @tylerboodman and @mikeloc !
I’m assuming this will help @quidsicurezza as well, but it definitely helps me.
I’m pretty new to Bubble and I am finding solutions to things but I feel very much like I’m going the long way around when there must be simpler ways of doing things, and this is a classic example of that.
I’m going to take a more detailed look at both of your suggestions in the morning but from what I can see already I think there’s a lot I can learn from both that will help me in future.

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.