How to save input from html element using javascript to bubble

Just made a little demo using the Toolbox plugin:

In the HTML block, I created an input with the id “yourname”.

In the top left corner of the page I put a “Javascript to Bubble” element which, as its name suggest make a bridge between the javascript code and the bubble interface. It creates a function named “bubble_fn_readInput” and makes it result visible to Bubble as text.

Clicking the button triggers a workflow a runs a javascript code. The codes simply reads the value of the input, using its ID and runs the function “bubble_fn_readInput” with the value as a parameter.

Just below, there is a text element that displays “Your name is:” + the result of the function (which is the parameter we just passed).

11 Likes