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: Material input field label is not clickable

Custer priority asked 5 years ago


Expected behavior If I want to enter something in a material input field it should also be possible to click on the label, not only beside, to enter something.

Actual behavior If I click directly on the label I'm not able to enter text. I have to press beside the label, so I can enter text. I saw it's working in your documentation.

Resources (screenshots, code snippets etc.)enter image description here

This is my code:

<div class="row">
    <div class="col-12">
        <div class="md-form">
            <input class="form-control" type="number" name="hausnummer" maxlength="50"        
              value="<?php echo $hausnummer?>"/>
              <label class="mdb-main-label" for="hausnummer">Hausnummer</label>
         </div>
   </div>

Adam Jakubowski staff answered 5 years ago


Hi,

The solution to your problem is that in this line <input class="form-control" type="text" name="problemzeitraum" maxlength="50" required/> you did not give id if you add this your line should look like this <input class="form-control" type="text" id="problemzeitraum" name="problemzeitraum" maxlength="50" required/> and everything should work.

Best,

Adam


Custer priority commented 5 years ago

Seems to work! Thank you very much for your help :)

Best regards

Custer


Custer priority answered 5 years ago


Here's the snippet. Sorry for the delay.

https://mdbootstrap.com/snippets/jquery/custer/945921


Adam Jakubowski staff answered 5 years ago


Hi,

please, create a snippet showing your problem here: https://mdbootstrap.com/snippets/. I'll try to help you.

Best,

Adam



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: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.8.5
  • Device: Computer
  • Browser: Chrome (newest)
  • OS: Windows 10 (1903)
  • Provided sample code: No
  • Provided link: No