Button to toggle visibility of another layout element

682
6
Jump to solution
01-04-2024 01:16 PM
Labels (1)
ZorbaConlen1
Occasional Contributor III

Hi. I'd like to add a button to the interface that will toggle the visibility of another element. Let's say, a table widget.  It's fine if the widget is nested in another layout widget if that's the way to configure it. I'm not intending to use the dev edition. Is this possible OOTB?

Button link options include both 'View' and 'Window', but neither seems to work as desired. Windows are modal and that's not what I need. I'm not having luck with the View option either. Could be just that I'm new to ExB though.

Another option would be toggle or open a sidebar, but from other posts, I'm seeing that's not feasible.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

The Button Widget linking to a View should work. Where you might be getting tripped up is that the views are managed through the Section Widget. Place your disappearing widget inside of one view within the Section Widget and make the default view blank and transparent. This should make a widget appear out of nowhere, but you will need to build a second 'Close Table' button to make it go away. Also keep in mind that the transparent empty view will make whatever is under it non-reactive.

Or you could just use the buttons built into a Sidebar or Widget Controller.

GIS Developer
City of Arlington, Texas

View solution in original post

6 Replies
JeffreyThompson2
MVP Regular Contributor

The Button Widget linking to a View should work. Where you might be getting tripped up is that the views are managed through the Section Widget. Place your disappearing widget inside of one view within the Section Widget and make the default view blank and transparent. This should make a widget appear out of nowhere, but you will need to build a second 'Close Table' button to make it go away. Also keep in mind that the transparent empty view will make whatever is under it non-reactive.

Or you could just use the buttons built into a Sidebar or Widget Controller.

GIS Developer
City of Arlington, Texas
ZorbaConlen1
Occasional Contributor III

Ok, I like the idea with the transparent view. I did try using a widget controller, but with that option, you don't have much control of placement or size. 

I got it working with the transparent view idea. Not bad, but a couple minor issues at least the way I did it. Just a prototype so not really styling it nicely (I'd probably have the button look similar to the widgets with just an icon). I added the close button, but couldn't figure a way to have it sit directly in the table widget, so it's kind of awkwardly above it. And my section is in a sidebar with a map which seems to cause the embedded map widgets like 'Select' to display above the view. See screenshot.

Another minor detail. I'd like to have the transparent view visible by default but I can't configure that and it always shows the table visible.

Thanks for the suggestion.

ZorbaConlen1_0-1704409095148.png

 

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

A Widget Controller really should be your best option. What version are you using? Your options may be a bit limited on some versions of Enterprise, but you should be able to place it however you want in Online.

You should also be able to set the default view some how. I don't have the time to find the settings right now, but it is an option. Remember that the question mark in all the settings panels can take you to the official docs.

GIS Developer
City of Arlington, Texas
0 Kudos
ZorbaConlen1
Occasional Contributor III

Yeah, I'm using Enterprise 11.1, I think. Certainly, some differences compared to AGOL. I'll give it a spin. Thx.

0 Kudos
JeffreyThompson2
MVP Regular Contributor

In that version of Enterprise, you should be able to re-size widgets in a Widget Controller, but you have no direct control over their position. It is based on the position of the Widget Controller.

To set the default view in a Section, simply drag and drop the views to re-order them. The one on top will be the default option.

JeffreyThompson2_0-1704818542662.png

Sorry, I did not get back to you sooner. Last week, I was on a call with my co-workers who were de-bugging my own work while running a fever. My head is finally clear enough to remember how to re-order the views.

GIS Developer
City of Arlington, Texas
ZorbaConlen1
Occasional Contributor III

Great. Thanks!

0 Kudos