Password field - Password protect only portion of a custom panel

Hi again!

Sitting here with a problem I did not expect.
We want to password protect only a portion of a custom panel, to hide presets that should not be messed with for example.
And we simply have those buttons disabled or hidden in a canvas that we then reveal when you click a button and type in the password in another canvas that shows up.
However, this is all in clear text for anyone over my shoulder to read. Is there a way to make a text field into a password-style field?

I’ve been trying to search here on the forum, but I’m only finding the millions of posts on how to password protect a dashboard from being edited.
Wich I do know how to do.

Hi Aleksander
Yes, there is a hidden widget hint for password fields. If you go into the Parameters dialog, you can modify the hint of any text field and change it to ‘password’ to get the hidden characters.

Just to note: the password itself is still in clear text and written to the parameter (you’ll probably want to also make it stateless by selecting the ‘do not save changes made to parameter value’ checkbox). This widget hint only changes how it is shown in the user interface.

Aha! I knew it had to be there somewhere.
And the stateless checkbox was a nice touch as well. Never really tried that, but that’s a good suggestion for sure!

Thanks again!

Follow up question for you @James Peltzer - How do you also set a button to be disabled on DashBoard opening/load.
Then I can change state of this with the ogscript.setEnabled(‘ID’, true);

You cannot specify enabled/disabled at the time the button is created. You will need to use an … block to set your buttons to the correct state when the panel is opened. The most common paradigm I have seen for disabling a large block of controls is to use an to cover the part of the application you want to protect and then use the password prompt to hide the .

So this wouldnt work with an API tag that run script on load?
And then set the buttons as disabled there?

We were thinking about covering them with , but the buttons themselfs are withing a responsive table that changes size based on the width of the panel, and positioning an to cover that is more troublesome than I would like to admit. Though it’s only 3-4 buttons on this case, wich would be no hassle to disable. For larger areas and a fixed with panel, that would definetly be my sollution.