I want to add a “follow” button next to a users name. The issue is the follow button needs to be at the end of the users name, and users name changes in width depending on how long or short said name is.
How do you make a dynamic width text box or have a group/button move relative to the end of inserted text, rather than end of the text box itself. Ideally the text box width would move to compensate the added text, but on my screen it just adds a new line.
you can’t do dynamic width of elements like that in bubble.
So you would have to put it all in a text element. luckily the text element does take bb code. i’m not at the computer at the moment. but you could to upload an image of the button, and try something like this.
You have to use html, it’s possible but it means using the toolbox plugin for onclick events to bubble workflows so not exactly native, I use it in my app like this.
@casheets123 this is extremely limiting to use just images and icons, it’s not a viable solution for most developers.
What workflow do I run so that when the button above is clicked, I can pull the current user’s following field and then add the current page creator to said field?
-Install the plugin name Toolbox by Mishav
-add a BubbletoJavascript to your page
-set the publish event to true
-write this in your button onclick=‘bubble_fn_name’
-set the workflow for the element event
That doesn’t allow me to start a workflow for the button inside a html element. I don’t want user’s to be able to click their name AND the follow button to start a workflow, only the button part of the html, if that makes sense.
And I can’t start a workflow by clicking a html element. It won’t let me.
'bubble_fn_followuser(“currentusersuniqueid”) < what’s the point of the part in brackets if I’m not running a javascript action? if I put (“lalalalala”) it still works the way it should and makes a change to the current user’s following list, so why do I need the part in brackets if no matter what I write within it, it works the way I want?
this is to pass value around at the exact time of the button click event, it’s used in repeating groups where you can directly reference the cell. You could also use yes/no/number values here, or write some other javascript like ternary operator x >= y ? z : x
Yeah I had to change (‘currentusersuniqueid’) to (“currentusersuniqueid”) which made it work. I’d of never managed that without your guidance and thanks for teaching me a thing or two!
Is there any way to not pass the value, just purely have the onclick event without the brackets? All I need is to allow it to make a change but if I remove the brackets it breaks.
Oh yeah for sure, it’s a very limited option. But that’s native bubble for ya sometimes. If you need a more robust set up, java is definitely the way to go here.
But if you just need to plonk down a quick button/icon/image what have you inside a text element, it will do the trick pretty well.