Need someone familiar with Toolbox/javascript to save text from html element to bubble database

I am using this plugin to make a route manager that finds the most efficient route between two locations with multiple stops here: https://travelplanner.jasminealley.com/any_location

When the user chooses a location, the address is stored in my database.

When they click a button to optimize their route, the plugin outputs route directions showing the most efficient route between those addresses that look something like this:

Route Segment: 1
Austin, TX, USA to 605 Azie Morton Rd, Austin, TX 78704, USA
2.2 mi

Route Segment: 2
605 Azie Morton Rd, Austin, TX 78704, USA to Zilker Nature Preserve, 301 Nature Center Dr, Austin, TX 78746, USA
1.1 mi

Route Segment: 3
Zilker Nature Preserve, 301 Nature Center Dr, Austin, TX 78746, USA to Dallas, TX, USA
198 mi

Once you choose to optimize your route, the plugin outputs text like the above to whichever element you have given the ID of: instructions_id.

I would like to parse that text with RegEx and add information to these locations in my database such that I can put them in a repeating group in the optimized order.

I already have the RegEx to extract these locations and make edits to them in my database such that I can order them properly.

However, I have tried everything I can think of to save the optimized directions text output from the map extender plugin to my database with no luck.

I think the only way to do it is to use Javascript.

Unfortunately, I don’t know Javascript, so I could use some help.

I think someone proficient with bubble and javascript could probably get this done in <1 hour (maybe <10 mins).

I’m happy to pay a reasonable rate!

I’ve never used that plugin. Are you saying that you can’t access the plugin’s output from a workflow? It seems really odd that the plugin wouldn’t return a list - or at the very least, a string - and let the Bubble developer do what they want with it. :confused:

1 Like

Unfortunately, No. You can’t access that output from workflows. The only place you can do anything with the output is here.

I think it’s a very poor decision on behalf of the plugin creator. (I’m not trying to speak negatively of Zeroqode. I think what they’re doing is awesome. But I’ve used several of their plugins and they often require strange workarounds or have issues like this one). This is why I need some Javascript help.

I see. Well, I normally don’t recommend using the Toolbox plugin (simply because doing so creates a “hybrid” and not a true “no code” app), but since you must resort to JS anyway in order to monkey patch the plugin, it might be a viable option to consider in this instance. You could probably get forum help to do it yourself.

I agree. I tried everything I could think of to avoid using javascript. But I really don’t think I have any other option. (I’d love to be proven wrong though!) I’ve only had luck getting a response in the non-freelancer sections of the bubble forum when I find someone who has answered questions before and DM them on Twitter asking them to help me :slight_smile: In other words, I haven’t had much luck on the forum. I’d rather pay someone to hop in and make the edit for me quickly than to wait for a response in the forum that I may never get.

@vini_brito is your guy for the job.

2 Likes

Indeed! And thanks for the mention :smile:

Hello all,

Thanks for the dialogue! Someone sent me a dm and I hired him. He got it fixed. @vini_brito I’ll keep you in mind! I bet I’ll have some more stuff in the future and I’m always happy to know of good bubble creators!

1 Like

fyi I’ve worked this out yesterday, how to get the text from html using toolbox and a little javascript, so posting here for reference:

1 Like