You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'placeholder' => 'Select some multiple options', // input placeholder
450
450
'default' => ['foo', 'bar'],
451
-
],
451
+
],
452
+
453
+
454
+
Sensitive field type
455
+
--------------------
456
+
457
+
Since Nextcloud 32 there is a new field attribute ``sensitive: true/false`` available for ``DeclarativeSettingsTypes::TEXT``, ``DeclarativeSettingsTypes::PASSWORD`` types.
458
+
The values of such fields are stored in an encrypted form in the database and are not exposed to the UI.
459
+
460
+
461
+
.. code-block:: php
462
+
463
+
[
464
+
'id' => 'test_sensitive_field',
465
+
'title' => 'Sensitive text field',
466
+
'description' => 'Set some secure value setting that is stored encrypted',
467
+
'type' => DeclarativeSettingsTypes::TEXT,
468
+
'label' => 'Sensitive field',
469
+
'placeholder' => 'Set secure value',
470
+
'default' => '',
471
+
'sensitive' => true, // only for TEXT, PASSWORD types
472
+
],
473
+
[
474
+
'id' => 'test_sensitive_field_2',
475
+
'title' => 'Sensitive password field',
476
+
'description' => 'Set some password setting that is stored encrypted',
477
+
'type' => DeclarativeSettingsTypes::PASSWORD,
478
+
'label' => 'Sensitive field',
479
+
'placeholder' => 'Set secure value',
480
+
'default' => '',
481
+
'sensitive' => true, // only for TEXT, PASSWORD types
0 commit comments