Storing Data from HTML text input

Does anyone know how I can store data from an HTML element (a text input) within my Bubble App to my app data via a workflow?

The “Toolbox” plugin has an element called “Javascript to Bubble”, intended to help with getting data back into Bubble, and also from today has “Run javascript” from a workflow action.

So the workflow can run a script such as

bubble_fn_receive_input( $(‘#my-input’).val() );

Then the element will have the value available, plus raise an event if you want to continue with another workflow.

3 Likes

@mishav would there be any chance you could add an example of the bubble_fn_receive_input( $(’#my-input’).val() ); to the Toolbox Plugin examples app? please

Doh! me…scratch that you already have

@mishav this sounds amazing and something I am desperate for.

Although, my HTML, especially JS knowledge is very very limited. I had someone help me with creating the code that I currently use in my HTML element.

I think I have set it up properly (which I am pretty sure I have oversimplified, or got it wrong completely), but I can’t figure out the function to use in my HTML element for this to work.

Basically, what I am trying to do is, save addresses from my HTML element’s inputs to my DB, as I am unable to use the Bubble inputs for this particular task I am trying to achieve.

I will keep going over your initial post linked above, until something clicks, but if you can steer me in the right direction, I would very much appreciate it.

Hi @mikescullion, you’re on the right track, some minor adjustments.

The function name used in the “Run javascript” needs to match the one defined by “Javascript to Bubble”, so just “bubble_fn_1” instead of “bubble_fn_1_receive_input”.

“Asynchronous” means “continue the workflow, without waiting for the function to finish”, so when retrieving the value in the next workflow action, it might not be ready yet.

Alternative 1: turn off “Asynchronous”, to wait for the function to finish.

Alternative 2: if you find this unreliable, you can leave Asynchronous on, and create a new workflow based on the “Javascript to Bubble” element’s “event”, and pick up the value there.

Good luck!

2 Likes

@mishav thank you so much for all your help. Your plugin really has helped me with my project massively, and no doubt saved me a bit of ÂŁÂŁÂŁ with a sponsorship request I was making.

This plugin really has opened new doors for people like myself (non-programmers), extending our capabilities further with point-and-click programming. :relieved:

2 Likes

@mishav is collecting this text treated differently if it’s a username and password?

EDIT: It seems there is something within bubble that prevents the UN and PW from being passed to an input as if someone typed it. Anyone know a workaround for this?

What sort of edit element are you using to collect this info?

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