Javascript to Bubble (html input + repeating group)

Hi there,

Wondering if I might ask for a little bit of help regarding the JavaScript to Bubble element (in the Toolbox plugin). I’ve created an example of my problem here:

So, what I’m trying to do is have a HTML element on the page which when clicked displays the Open File dialog. This input dialog accepts multiple file selections and inside the HTML is some JavaScript. When the script runs I’m returning the Base64 contents of each image and I’m then trying pass those into an array/list of some kind so I can use it as the data source for the repeating group and display these images. Is this possible?

I set my data source for the repeating group to be: ‘JavascripttoBubble A’s value list’ and I’m pretty sure the JavascripttoBubble element is set up correctly, I may be referencing it wrong in the actual script though.

I’m attempting to create my own file uploader so to speak and I’m almost there but I just can’t quite figure out what’s going here. What I don’t want to do is upload the images straight into the database first which is what all the other uploaders seem to do so thought I’d have a crack at doing it myself! wish I never started now!

I’ve managed to fix my own problem but the value for the Bubble_fn_suffix is only getting populated when I put an Alert(imageList); into the code, no idea why yet…

I got it working in the end, issues were with the callbacks in the JavaScript. I’ll post up a tutorial for others that may wish to create their own multi-file uploader where the images are not pushed to the database straight away, instead I’m now able to access them in a List in bubble workflows without using any API’s.

1 Like