Print #2944
-
Is possible to add print button ? To print like report |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi @oaslsjcnndq, You can add an embed html print button. Ex.
rec-screen.mp4 |
Beta Was this translation helpful? Give feedback.
-
We would really like to support this sometime soon-ish, but it's not on the roadmap right now. There's a discussion on it here: #1696 Please upvote and add your thoughts in here :) |
Beta Was this translation helpful? Give feedback.
-
This is maybe very old, but I hacked a solution. I want a very simple "Print" button that calls the system print dialog. Since the normal Button element from Budibase does not support a JavaScript action (which would be great if it did) I just added a dummy button to have the button exist in the first place, then hid it with a Condition (if 1=1) and then added an Embed element with exact the same html code (got it from inspector), plus I added an onclick action:
It could maybe be a nice idea if budibase would support JS actions on the buttons, just to add some pep to the development ;) |
Beta Was this translation helpful? Give feedback.
-
Hi, i tried this but i guess not work anymore. Any other solution to print the whole page? Thanks |
Beta Was this translation helpful? Give feedback.
-
Add a button with an on-click action to update state In the value, switch to javascript and use Because the JS here is evaluated for the preview, the code is effectively being run at any change you make, so it's likely that just typing out that line of JS will open a printing dialogue. This will also be the case when you open the bindings drawer, or make any further changes here. Save the JS here, and publish. The button will now trigger printing the page. Please note that while this is possible to do, it is not by any means a tested feature of Budibase, and may be unpredictable or produce unexpected results. |
Beta Was this translation helpful? Give feedback.
-
@mikesealey |
Beta Was this translation helpful? Give feedback.
This is maybe very old, but I hacked a solution.
I want a very simple "Print" button that calls the system print dialog.
Since the normal Button element from Budibase does not support a JavaScript action (which would be great if it did) I just added a dummy button to have the button exist in the first place, then hid it with a Condition (if 1=1) and then added an Embed element with exact the same html code (got it from inspector), plus I added an onclick action:
<button onclick="window.print()" class="spectrum-Button spectrum-Button--sizeM spectrum-Button--primary svelte-1gv5n3y spectrum-Button--quiet c0559966773234991a3d43bc7904da611-dom" contenteditable="false" draggable="false"> Imprim…