Plugin readonly field, password field, and message feedback
AnsweredOur Request:
What is the best practice of this feature?
(2) Show encrypted password field in settings
Use Case:
Didn't find password type in setting_model.md
Use Case:
We will show how many channels support by license.
This field should not being modified by user.
Thanks!
-
(1) Show Error message inside setting fields
What is the best practice of this feature?
Out of the box, there is no possibility to analyze settings values inside the Settings window, because settings values are available for analysis inside the plugin only, i.e. whey those are passed to the plugin after the Apply/Ok button is pressed.
Use the pushPluginDiagnosticEvent() method to send an notification to the Client application.
Since client application source code is available, another option would be customizing the source code by adapting to your needs and releasing your customized client application.
(2) Show encrypted password field in settings
That is not possible in the current version. We have the feature request. Hopefully the feature will be implemented in the version 5.1
(3) Show readonly field in settings
Hopefully it will be available in the version 5.1
As for now, as a workaround, you could use single-choice RadioButtonGroup element for displaying a readonly value.
For example,
In the "Choose one" setting in the screenshot, you could change the "London" value to the one you need.
See the stub_analytics_plugin for details.
Here is how it's presented in the code.
static const std::string kEnglishCitiesSettingsModelPart = /*suppress newline*/ 1 + R"json( { "type": "RadioButtonGroup", "name": "testEnglishRadioButtonGroup", "caption": "Choose one", "description": "Choose one option", "defaultValue": "London", "range": [ "London" ] }, )json";
To display the needed value you just change the value of the "range" or you can omit the "range" parameter and use the "defaultValue" parameter.
0 -
Hi,
To display the needed value you just change the value of the "range" or you can omit the "range" parameter and use the "defaultValue" parameter.
I'm sorry, the "range" parameter is mandatory and CAN'T be omitted. It's my bad.
0
Please sign in to leave a comment.
Comments
2 comments