Topic: Incorrect placeholder position in forms
                  
                  aionys
                  pro
                  asked 7 years ago
                
https://files.slack.com/files-pri/T8WT0UL3H-FBV1JEB5Z/image.png.
I know, that it's possible to fix with the help of active class. For example
<div class="md-form">
<input mdbActive type="text" class="form-control"               formControlName="clientId" [value]="visit.clientSamId"  id="clientId">
<label for="clientId" [class.active]="form.controls['clientId'].value">Client Id</label>
</div>
But i want, that it works correctly without this workaround.
                
                  
                      
                      Arkadiusz Idzikowski
                      staff
                        answered 7 years ago
                    
aionys pro commented 7 years ago
It's the first image <a href="http://prntscr.com/ka9e56"" rel="nofollow">http://prntscr.com/ka9e56</a>. I tried to use mdbInputDirective, but result look something like this <a href="http://prntscr.com/ka9fgv</a>" rel="nofollow">http://prntscr.com/ka9fgv</a>. Its the part of code <form *ngIf="!submitted" [formGroup]="loginForm" novalidate (ngSubmit)="onSubmit()"> <div class="md-form"> <i class="fa fa-user prefix grey-text"></i> <input type="text" id="username" class="form-control" formControlName="username" mdbInputDirective> <label for="username">Логин</label> </div> </form> How to deactivate validation?Arkadiusz Idzikowski staff commented 7 years ago
Dear aionys, Add [mdbValidate]="false" to your input. Best, Arekaionys pro commented 7 years ago
It's help, thank you!FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
 - Premium support: No
 - Technology: MDB Angular
 - MDB Version: -
 - Device: -
 - Browser: -
 - OS: -
 - Provided sample code: No
 - Provided link: No