Topic: Can't get material select initiated

Tanguy Lesseliers pro asked 5 years ago

Hi,I\'m trying to get a mdb-select in a form (using MDB Pro 4.3.2) in a laravel project.The form also contains a checkbox. Based on that I can see that I\'m using the correct css and js from mdbpro.But In the console I get following error :app.js:29 jQuery.Deferred exception: $(...).material_select is not a function TypeError: $(...).material_select is not a function

Tanguy Lesseliers pro commented 5 years ago

code snippet : <code> <form class="form-horizontal" method="POST" action="{{ url('additem') }}"> {{ csrf_field() }} <!--Body--> <select class="mdb-select"> <option value="" disabled selected>Choose your option</option> <option>DVD</option> <option>MOVIE</option> <option>COMIC BOOK</option> <option>CD</option> <option>RECEIPE</option> </select> <div class="md-form"> <i class="fa-book prefix grey-text"></i> @if ($errors->has('title')) <input type="text" id="title" name="title" value="{{ old('title') }}" required autofocus class="form-control validate invalid"> <label for="title" data-error="{{ $errors->first('email') }}">Title of the item </label> @else <input type="text" id="title" name="title" value="{{ old('email') }}" required autofocus class="form-control" > <label for="title">Title of the item</label> @endif </div> <div class="md-form"> <i class="fa fa-lock prefix grey-text"></i> @if ($errors->has('orginalTitle')) <input id="text" type="orginalTitle" class="form-control validate invalid" name="orginalTitle" required autocomplete="off" > <label for="orginalTitle" data-error="{{ $errors->first('orginalTitle') }}">Original Title</label> @else <input id="orginalTitle" type="text" class="form-control" name="orginalTitle" required autocomplete="off"> <label for="orginalTitle">Original title</label> @endif </div> <div class="form-group"> <input type="checkbox" name="whished" {{ old('remember') ? 'checked' : '' }} id="checkbox1"> <label for="checkbox1"> Like to have item</label> </div> <div class="text-center"> <button type="submit" class="btn btn-default waves-effect waves-light">Create</button> </div> </form> </code>

Tanguy Lesseliers pro commented 5 years ago

this is the result in the browser

Bartłomiej Malanowski staff commented 5 years ago

Please share your full code with us

Please insert min. 20 characters.


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



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No