Output HTML directly from database

I am looking to have a database full of events and each record has a field containing the HTML from a PayPal Buy Now button. I want to show the info about the event and then show the Buy Now button dynamically but when I add it to the page, the raw HTML is shown instead.

Is there a way of outputting it so the button displays correctly?

Select where you would like the button, then apply: Dynamic Attributes - Display - Inner HTML. Should now display the button?

3 Likes

I need tot do something similar. Please post a link to your site when you are done.

I completely forgot about the Inner HTML dynamic attribute. That’s worked like a charm. Just put any element onto the page, use the Inner HTML dynamic attribute and select the field which contains it.

2 Likes

I know how to do that. I was just more curious to see your events pages. :wink:

Aah, sorry. I’m afraid there’s nothing to show at the moment. I’ll try and remember to let you know once it’s finished and live, though.

1 Like

Incidentally, I’m using directus.io on this one so they can easily maintain all the event data so it’s going to be a good learning project. I’m using the directus API to interact with the database in Wappler so all data changes go through the same process. Could be fun!

1 Like