Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Is there a way to add a prefix icon to a mdb-select dropdown menu ?

Patbaudy pro asked 6 years ago


As all the fields in my form have a dedicated icon, I tried to add an icon (fontawesome svg) to the left of an mdb-select dropdown menu as it is possible using prefix for an input textfield but it doesn't work.
Here is my code:
<div class="md-form py-1">
      <i class="fas fa-globe-americas text-mdgray prefix"></i>
       <select class="mdb-select">
           <option value="" disabled selected>Province *</option>
           <option value="">Québec</option>
       </select>
</div>

Thanks in advance for your help.


Piotr Glejzer staff commented 6 years ago

Hello,

For that moment I think is not possible to do excacly what you want. Here is a 'work around' about that but is not what you proabbly want.

https://mdbootstrap.com/snippets/jquery/piotr-glejzer/149498

Sorry about that.

Best,

Piotr



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No