GUIDE : Restricting some letters in a Text-Box

Hello!

Hi guys :grinning:,


Introduction

In this GUIDE we will be learning how to restrict some letters like special
characters in the Text-box.


First, we will be using an extension called TaifunText-Box by Taifun.
Because there is no event block called “OnTextChanged” listener block in
Niotron and so I request Developers to add this block in the upcoming update.


What is Text-Box?

You can go to this link to understand what is a Text-Box
Link - https://builder.niotron.com/reference/components/userinterface.html#TextBox


Designer Tab

#1

Here I have done a simple design with three components, they’re : -

  • Text-Box
  • TaifunText-Box extension
  • Notifier

#2

  • Text-Box - Taken for restricting some letters/symbols/anything.
  • TaifunText-box - For using “OnTextChanged” event block.
  • Notifier - A notifier to show alert message if user enters any special characters.

Blocks Editor

#1

There are some ways to follow to block special characters, we will learn them one by one.

#2

Fist we will initialize all the special charters or any charters which you don’t want user to enter in a Tet-box in a list of a variable.

#3

When the screen initialize, we will start a TextChangedListner for the textbox which you want to block any characters from TaifunText-Box extension.

#4

We will take a event block called AfterTextChanged from Taifun extension.
First we will check if the last word of the Text-box text, if the segment is in the list of the variable then we will remove that last letter of the Text-box and show alert message that “Please do not include any special characters”.


Downloads


Request

  • A request to Niotron developers to add on AfterTextChanged event block.

Credits


Ending

  • Hope you enjoyed and learnt something new in this topic!
  • Feel free to contact me via Email - [email protected] or you can
    just PM me.
  • Any suggestions or improvement to this topic will be appreciated, you can just say me, I’ll update it.

Xoma

Email me - [email protected] or PM me.
Graphic Designer,

Happy Niotroning
Regards,

8 Likes

really very Nice guide :sunglasses:

6 Likes

Great alternative for on text Change events with batter explains. Guide is really awesome and interactive.

6 Likes

I didn’t see a guide like this nice guide ever

7 Likes

component_event (1)

No Need To Use Taifun Textbox

Niotron have material textbox. use this textbox instead of normal

5 Likes

:+1:t2:

Quiet relevant and correct for sure

3 Likes