Broken dynamic input


Topic: Broken dynamic input

Mobtex pro asked 6 years ago

See image please,
 
Add input after request, broken: 
https://drive.google.com/file/d/1manJNSR8jLRzsO6fo9dBKyZWUX4_3vQi/view?usp=sharing

<divclass="col-12"*ngFor="let item of processo_info;let i = index">

<divclass="md-form form-group">
<inputtype="text"class="form-control"value="{{item.value}}">
<label>{{item.label}}</label>
</div>
 
</div>

Damian Gemza staff answered 6 years ago

Dear Mobtex,

You're missing mdbInputDirective on input element in your code. This directive is used to move label to the top of the input element when it got some value.

Your code should look like below:

<div class="col-12" *ngFor="let item of items; let i = index">
<div class="md-form form-group">
<input type="text" class="form-control" value="{{item.value}}" mdbInputDirective id="{{item}}-i">
<label for="{{item}}-i">{{item.label}}</label>
</div>
</div>

Best Regards,

Damian


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
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: Browser
  • Browser: Firefox
  • OS: Mac
  • Provided sample code: No
  • Provided link: No
Tags