Problem with inner HTML and Repeat

Hi, I have the next problem with my repeat element

Specifically with the second repeater, when i use the dynamic attribute (Inner HTML)
Screenshot from 2020-01-13 16-16-37

This dynamic attribute (Inner HTML), load the html_code field from my database

Within this field I have the dynamic “button_name” attribute
Screenshot from 2020-01-13 16-17-26

When I load my page everything is fine until it is time to load this attribute inside the button

It doesn’t look like the area is contained within a repeat? You need to wrap the block in to a repeat then this should work correctly. Or if this is a detail page you simply need to bind the corresponding data to the button.

Sorry, and welcome to Wappler! :slight_smile:

Unfortunately there only seems to be documentation for Nested Repeats @George @Teodor

But on the DMX website there is a compatible guide:

@Premper

Essentially if you can not locate documentation here for the moment, please check out the DMX Zone website for documentation that should correspond to that currently missing from the Wappler documentation. Also a lot of videos well worth watching that could bring you up to speed in no time at all!

:slight_smile:

I am not sure how the docs are related to this issue?
The repeat regions and nested repeats are already in Wappler docs, no need to watch any of the DMXzone videos.

@Premper
Are you storing dynamic {{expressions}} as text/html in your database and then want to render them on the page?

That’s what I thought it looked like, I think in his blob stored SQL data he may be adding an expression, which I have never tried but would be pretty impressed if it actually could render it, which I doubt.

1 Like

Pardon my interruption :wink:

1 Like

Yes, when i try to render this dynamic expression doesn’t work

Yes, that is exactly what I am doing

I don’t think you can do this entirely in Wappler. What you can do is create a PHP file which gets the dynamic expression and reference this as a PHP include file, where the expression would normally appear within the repeat.

I’ve done this with a dropdown menu which sets a cookie; this cookie is used to get the required expression. I couldn’t use Wappler for the include file*, so I used a standard MySQLi connection and query - obviously you could use PDO.

One other thing: if you change the expression, you’ll need to reload the page - so the PHP file can run on the server again to get the new expression. Eg you can add a static event ‘window.location.reload()’ on successful form submisstion (the form which sets the new session).

There may well be other/better ways to do this.

(I’m not sure why I couldn’t use Wappler for the second file - an ‘App Connect already running’ error message appeared. I expect it is possible and I was doing some wrong.)

1 Like

We never mind your interruptions, the amount of questions i misunderstand what the person actually is trying to achieve would make you cry. Not always easy interpreting so many different peoples ideas.

1 Like