Topic: Can I use empty placeholder with MDB Select jQuery plugin to have a floating label?

Drakulovski pro asked 6 years ago


Hi, Can I use empty placeholder with MDB Select jQuery plugin to have a floating label as I'm using it for the normal text inputs, and when I click on the field, the label moves above as it is with the material design? I have tried many combinations, but always the first option is there like Placeholder. It looks ugly in the form like this. Is there a way I can have the same behaviour as we have with the regular text input?  

Drakulovski pro answered 6 years ago


Here are the two inputs, one normal text, and one mdb-select  
<div class="row">
    <div class="col-lg-12">
        <div class="md-form">
            <input type="text" id="form1" class="form-control">
            <label for="form1">Document number</label>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-lg-12">
        <div class="md-form">
            <select class="mdb-select colorful-select dropdown-primary"  searchable="Search here...">
                <option value="" disabled selected>Select Employee</option>
                <option value="1">Employee 1</option>
                <option value="2">Employee 2</option>
                <option value="3">Employee 3</option>
                <option value="4">Employee 4</option>
                <option value="5">Employee 5</option>
            </select>
            <label>Select Employee</label>
        </div>
    </div>
</div>

Piotr Glejzer staff commented 6 years ago

Hi, Our select doesn't have material design animation like label and input. We will think more about this. Have a nice day. Best, Piotr

Piotr Glejzer staff answered 6 years ago


Hi, can you show me your code? With your image, I see you are using Material Inputs and that example doesn't have a 'placeholders' and yes, It is a material design. 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

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.9
  • Device: Macbook Pro
  • Browser: Chrome
  • OS: macOS High Sierra
  • Provided sample code: No
  • Provided link: No