Display selected element data in a modal form a collection list

hi, I’m try to display the selected element from a collection list,
is it possible to pass the array index to the modal and get it from the collection?
or i can save the element in a custom variable and then use it, what is the best practice in weweb

also i can’t see the elements inside a modal in the navigator, i don’t know if it’s a bug or is somewhere else

thanks

1 Like

Yes, you can utilize the array index in the modal.

  1. create a variable called selected_item
  2. create a workflow on the item that you want to click on to open the modal
  3. as an action item in the workflow, change the selected_item variable to the index
  4. in the modal, use the selected_index variable to filter your collection

On modals, you should be able to click on the section element in your navigator pane, and then under Specifics, it should show “Force Display in Editor”. This will allow you to view the modal even if its hidden for the UI.

You should definitely be able to see the elements in the navigator in tree view. If not, you may want to delete your modal, and add a new one.

2 Likes

Thanks Kevin, but I can’t see the force display in editor, do you have a screenshot?

when i select elements outside the modal they automatically appear in the navigator in the left
when i select elements inside the modal nothing happens

thanks

Screen Shot 2022-06-13 at 5.52.16 PM

You must select the whole section in the navigation pane to see that.

I think you may need to delete and re add your modal. I’m wondering if something got shifted or an error is causing it not to display in the tree view for elements.

thanks but i can’t see it :thinking:
i recorded a video maybe is more clear

Ah ok, I see!

The Open popup Element is an old element with poor UX. We have plans to update it but, in the meantime, we recommend using toast or modals.

To force the display of a modal or toast, you’ll need to select the section in the Navigator and force the display in the settings as Kevin mentioned:

Does that help?

1 Like

Thanks Joyce, yes now is working :+1:t3:

1 Like