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
Yes, you can utilize the array index in the modal.
create a variable called selected_item
create a workflow on the item that you want to click on to open the modal
as an action item in the workflow, change the selected_item variable to the index
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.
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
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.
Hey @kevinwasie I’m a noob - when I create the variable “selected_item” it’s asking me for a type. Do I select Array? If so, what do I define as the initial value? And in the workflow, how exactly do I “change the selected_item variable to the index” ? And in your point #4, did you mean to say “selected_item variable”? And finally, what element do I apply my “select Item and open modal” workflow to? the entire collection list element? to the collection item inside that list? Thanks.