At least once I day I drop by the Bubble™community forum. It’s a vibrant place for people building their own web apps to share, connect and learn. Early on I was only a beneficiary of the help of others, but now I try to give much more than I take. It’s not completely altruistic though, which is why it is so great — things that are win/win for both parties are always much more valuable! In answering questions posed by forum participants, I get to accelerate my own learning by tackling somebody else’s issue of the day, not just mine or my client’s.
Here’s a few forum posts that helped me stretch, while also helping another builder…
You haven’t said where the list will be provided, so I’ve assumed an input element. Here’s a sample of creating a new thing for each phrase that is separated by a comma:
Create an API endpoint that accepts the value you will be adding:
In that endpoint, add an action to create the new thing (in my example a thing called random with a field called text using the value provided):
On the user page, you schedule that endpoint on a list (my trigger is a button press):
The List to run on, is made by parsing the input element value using regex, and then trimming away any white space on the ends.
Here’s the regex pattern:
This isn’t particularly difficult, once you have a solid regex pattern to use — which is an area that I continue to improve upon — not so much using regex, but understanding it. For the most part, I search the net for regex patterns to fit the current situation and then I use RegExr to dissect the components and test their application. I don’t use regex enough to quickly build my own patterns, but by taking the time to understand what others have built, I’ll get there.
I’ve used the Get parameter from URL operation a ton, but needed to do a quick check to see if this also supported form arguments — which it does! So as long as you have a named form element, you can retrieve it if posting over to a Bubble™page. Just another use of an existing widget.
This last one is not so much a new solution, but a reminder — sometimes, you gotta delete and start over. I was helping somebody figure out why an api connection was not delivering the expected results. We tried a few troubleshooting steps and eventually I suggested just removing it and entering it back in again. Voilà! Bubble™gets confused sometimes when you switch the api connection parameters around too much. If things look correct, and you’ve been trying several different options, just delete it all and enter from scratch to see if your problem is not really YOUR problem at all.