How can I help you?
Placeholder in ASP.NET Core OTP Input control
13 Jun 20241 minute to read
The placeholder in OTP Input specifies the text that is shown as a hint or placeholder until the user enters a value in the input field. It acts as a guidance for the users regarding the expected input format or purpose of the input field.
You can set the placeholder text by using the placeholder property. Additionally, when providing a single character as the placeholder value all input fields within the OTP Input control will display the same character.
@using Syncfusion.EJ2.Inputs
<div id='container' style="width: 350px;">
<ejs-otpinput id="otpInput" placeholder="x"></ejs-otpinput>
</div>
When a placeholder with multiple placeholder characters is provided each input field will display characters from the placeholder string in sequence based on the available OTP input length.
@using Syncfusion.EJ2.Inputs
<div id='container' style="width: 350px;">
<ejs-otpinput id="otpInput" placeholder="wxyz"></ejs-otpinput>
</div>