# Bubble element to HTML code

**URL:** <https://forum.bubble.io/t/bubble-element-to-html-code/384237>\
**Category:** Need help\
**Created:** [October 30, 2025, 10:50am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237 "2025-10-30T10:50:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![madecsalmanali](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@madecsalmanali](https://forum.bubble.io/u/madecsalmanali)\
**Post date:** [October 30, 2025, 10:50am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/1 "2025-10-30T10:50:35Z")

</div>

Hey everyone,

I’m building a page that allows the user to download a number of table elements from my bubble page about the users feedbacks. Basicaly, I thought about two ways :

**1 - Building a full JS handled HTML table :** Using the toolbox plugin, I run Javascript to retreive my data (from the feedback), then I build a table using JS logic, fill the data with the data from bubble, then I generate my PDF (using PDF co in make). This way works well, but it limits me from the other fields of the table I’m targetting (for example, I have a “sign” logic table, and if I’m passing the “feedback” data, from JS, I can’t do the logic as so to reach the other fields : feedback{i].fieldName)

**2 - Create the view in Bubble, then retreive the full HTML :** Still using toolbox, I retreive the HTML of the Bubble element (table element), then I generate the PDF using the obtained output. However, this disallows me to get the exact CSS, I seem to not be able to get the exact style I used on my Bubble element (with GPT, it allowed me to retreive a lot of CSS, but not exactly what I’m searching for, since there’s like a thousand of lines of CSS that isn’t usefull to the render, which isn’t really productive)

So basically, one method allows me to generate my PDF when I’m building everything using JS but I’m limited on the passed fields and conditions (except if I can reach the other fields), the other one allows me to use Bubble as the template but I can’t get the exact style.

I need some advices / tips, about how may I handle this please.

---

<div class="post-metadata">

**Author:** ![ahmed.elkaffas](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ahmed.elkaffas/32/246772_2.png) [@ahmed.elkaffas](https://forum.bubble.io/u/ahmed.elkaffas)\
**Post date:** [October 30, 2025, 5:56pm UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/2 "2025-10-30T17:56:45Z")

</div>

Check out this free Plugin, I didn’t try it myself but I believe it could help:

> **[Templates for Bubble](https://bubble.io/plugin/docugenerate-1730225425528x319288222630019100)**
>
> Buy and sell Bubble templates to speed up app development. Bubble is a visual programing language that lets you build apps without code.

---

<div class="post-metadata">

**Author:** ![mishav](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mishav/32/6420_2.png) [@mishav](https://forum.bubble.io/u/mishav)\
**Post date:** [October 31, 2025, 4:50am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/3 "2025-10-31T04:50:16Z")

</div>

> [@madecsalmanali](#):
>
> limits me from the other fields of the table I’m targetting

Hi @madecsalmanali it sounds like option 1 is giving you more control over the content and styling, and could offer a preview in an iframe. Can you elaborate on the limitation? Show how you are passing data to JS and there may be alternative approaches.

---

<div class="post-metadata">

**Author:** ![madecsalmanali](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@madecsalmanali](https://forum.bubble.io/u/madecsalmanali)\
**Post date:** [October 31, 2025, 7:33am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/4 "2025-10-31T07:33:34Z")

</div>

I’ll go take a look, thanks !

Update : it doesn’t really do what I want, basically, this plugin uses only templates, not exactly what I need. Appreciate the suggestion, thank you !

---

<div class="post-metadata">

**Author:** ![madecsalmanali](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@madecsalmanali](https://forum.bubble.io/u/madecsalmanali)\
**Post date:** [October 31, 2025, 7:39am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/5 "2025-10-31T07:39:58Z")

</div>

Hello @mishav ,

Indeed, the option 1 has more control, since I build the table on my own. The limitation I’m mentioning is accessing the others fields of the table, let’s take an example :

A table User with a uniqueID, a name, and an email.

Let’s say I get the data from Bubble like this : Search for User:firstItem’s uniqueID, using JS un a simple code snippet or a “run a javacript” : let user = “Search for User:firstItem’s uniqueID”; // eq : 1745a485458z4ax47 somehting like that for exmample.

In this example, the user is just a string, not the full user that would allow me to access the email or the name fields. Do I need to build a User model, using the same fields to build my User ?

I don’t know if it’s clear, let met know if there’s something missing in the explaination. Thanks

---

<div class="post-metadata">

**Author:** ![mishav](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mishav/32/6420_2.png) [@mishav](https://forum.bubble.io/u/mishav)\
**Post date:** [October 31, 2025, 10:03am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/6 "2025-10-31T10:03:33Z")

</div>

> [@madecsalmanali](#):
>
> Do I need to build a User model, using the same fields to build my User ?

To get structured data into JS my preference is to build a JSON string using Bubble’s expressions, then in JS do JSON.parse(string), then Bob’s your aunty

A related example is [toolbox-example | Bubble Editor](https://bubble.io/page?id=toolbox-example&tab=Workflow&name=servscr-merge-dates&type=page&wf_item=cmOrQ)

Look at how a list of books is converted to JSON in the Run JS workflow …

![image](https://us1.discourse-cdn.com/bubble/original/3X/7/1/71842a6f0e696c8c83c88b10ff7dab4bf3a32aed.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/b/cb7efa690f2fcf304b55b93d65a4bde8b8fe6911.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/f/6f8f5e464af2a3f30625a54114f2197628af7776.png)

Then in JS …

```auto
const avails = JSON.parse(properties.param4);
....
avails[j].createdDate

```

---

<div class="post-metadata">

**Author:** ![madecsalmanali](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@madecsalmanali](https://forum.bubble.io/u/madecsalmanali)\
**Post date:** [November 3, 2025, 8:58am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/7 "2025-11-03T08:58:53Z")

</div>

Hey,

Thanks ! I followed something similar, works perfectly for me. 🎉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [January 8, 2026, 10:51am UTC](https://forum.bubble.io/t/bubble-element-to-html-code/384237/8 "2026-01-08T10:51:28Z")

</div>

Closed on January 8, 2026, 10:51am UTC

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