Topic: Incorrect placeholder position in forms

aionys pro asked 6 years ago


I have a form with inputs. It looks like this 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 6 years ago


Dear aionys, I don't have access to this file, please upload image on website like imgur.com and paste link here. There is no 'mdbActive' directive in MDB Angular. You need to add mdbInputDirective. Best, Arek

aionys pro commented 6 years ago

It's the first image <a href="http://prntscr.com/ka9e56&quot" 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&gt" 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 6 years ago

Dear aionys, Add [mdbValidate]="false" to your input. Best, Arek

aionys pro commented 6 years ago

It's help, thank you!


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags