Alternative to PasswordComponent for Masked Text Field

2025/11/10 3:20 AM

Hi all,
Is there a way to create a text field in Xperience by Kentico that displays input as “*” or masked after saving, other than using the PasswordComponent? If you know any workaround or custom solution, please let me know. Thanks!


Environment

Tags:
Xperience Administration

Answers

2025/11/10 8:55 PM
Accepted answer

Hello

One Way - you can create a custom form component by deriving from FormComponent.

A practical example to reference is the HiddenInput implementation from the Kentico Community Portal:
https://github.com/Kentico/community-portal/tree/fb476705d53f41a9b038fcd8afbee37c0b2f39b3/src/Kentico.Community.Portal.Web/Components/FormBuilder/HiddenInput

This example shows the core structure of a form component, including the class, view, and registration.

For the UI portion (Razor/React/etc.), you can check whether the form is being displayed in view mode and adjust how the value is rendered. This allows you to conditionally hide, mask, or transform the displayed value depending on your scenario.

For a more detailed walkthrough of building a custom component end-to-end, Kentico’s documentation includes a full sample using a color selector:
https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/example-color-selector-ui-form-component

This guide covers:

  • Component class structure
  • Frontend rendering
  • Configuration attributes
  • Component registration

Together, these resources give you a solid template to build and customize your own form component while staying within supported patterns.

To response this discussion, you have to login first.