53
Views
5
Comments
Solved
put icon inside input within a client validation form
Question

Hi, 

I'm trying to do a client validtaion to validate some input, and I want to display an icon inside an input field like this:

Ihave tried yo use Input with Icon, but I cannot align the icon to the right.

any suggestions pleaes ?

2023-04-16 15-25-31
Krishnanand Pathak
Solution

Hi,

Set AlignIconRight to True as shown below:


Regards

Krishnanand Pathak





UserImage.jpg
you asen

Can I asign the icon to a local variable to controle the color please ?

2023-04-16 15-25-31
Krishnanand Pathak


Hi,

Just wrap the icon with container and apply the style classes as shown below:


Also sharing the oml for reference.

You can check the demo to see how it will work. Through below link.
Just start typing on input filed the icon color will change.

https://personal-qmzjggmd.outsystemscloud.com/Com/Screen10?_ts=638182139845537626


Regards

Krishnanand Pathak




ChangeColor.oml
2023-10-21 19-42-11
Tousif Khan
Champion

You cannot assign a icon to a variable, but based upon variable value you can add a css to your style  and change it 

Or you can add conditions like

Create different classes for color Like in your css style sheet

.ClrRed{ color:red;}
.ClrBlue{color:blue;}

If (value = "red", "ClrRed",If(value = "blue" ,".ClrBlue","")

Thanks

2021-03-08 09-24-09
Rúben Meireles

Hi All, 

You should not use inline styles, that is a bad practice and will be flagged by AI Mentor Studio.

Create a class or use one of the many already provided by OS UI, see all options here.

For example:

Cheers,

Rúben

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.