Can only modify items inside same container

I’m either just noticing this or something changed. :stuck_out_tongue_winking_eye:

If I have a button that calls a modal it only works when it’s inside the same element as the modal.

If I have a form, and a button that changes some values on the form, the button only works when it’s inside the same elements as the form.

I can’t change values on my form or call a modal from anything outside of those elements.

Is this new? Has it always been like this? :thinking:



I have a notice (a paragraph in a row) on the top of a page for a user. It shows up if the user forgot to finish filling out a form.

I want them to click on it, and it pops open a modal giving them a list of possible things they could fill the form with.

But, if I put the modal inside the form, then the notice on the top of the page can’t call it!
But, if the modal is outside the form, then the modal can’t fill the form with the correct information when the user selects it.

edit: the same is holding true for variable values as well

Try using data detail to load the dynamic content to the desire area or modal. Keep the popup modal in it own div element.

Yeah, I could do that.
I’m already using that for other purposes. I’m loading in an API and grabbing that and putting it in the form.

But, this is the second round. I want to populate the same form with other data.

Really, though, the question is about being able to transcend container elements.

Is this correct:

<container 1>
Variable A
</container 1>

<container 2>
Button
</container 2>

If I assign Button to change the value of Variable A, it won’t work… unless I put the button inside Container 1.

Is that how Wappler is supposed to work?

Is there any conditional regions or something that could cause the bind to be incorrect

Yeah, the form, and number of elements are inside conditional regions.

Do you think conditional regions are what prevents values from passing back and forth?

They seem to have an issue where the id isnt added to the front of the bind

for example lets say container 1 was a conditional region called condition_one

the bind would have condition_one.variable_name…

1 Like

My testing confirms what you just said.

The unfortunate part is that when using the Wappler panels it doesn’t always attached the prefix of the container so I’ll have to go in manually each time.

Thanks!

I’d also add, now, that it seems like if the ID is blank then it doesn’t matter.
But, if you name the ID then it matters.

I see. If you have your data loading from a repeat table with all the unique identity value tie to a button name button_1 with onclick that you want to pass. Lets say that button_1 is in <container 1> inside the repeat table. Now you would need to pass that data with an onclick to <container 2> Button or another repeat table. You can pick up those onclick data by using the data details as the source for the <container 2> Button or repeat table. So to answer your question in other to make <container 2> have any effect on <container 1> the flow has to be oneway street or circle starting from that repeat table source. Let me know if I am addressing this correctly

1 Like

I've made a bug report so the team can track this easier and hopefully get a fix :slight_smile:

1 Like

I was just about to! I’ll click on yours.

edit: is it on the forum?

1 Like