file input not working
somato-tomato opened this issue · 3 comments
Hallo,
im using this code from documentation for file input
<div class="form-group form-file-upload form-file-multiple"> <input type="file" multiple="" class="inputFileHidden"> <div class="input-group"> <input type="text" class="form-control inputFileVisible" placeholder="Single File"> <span class="input-group-btn"> <button type="button" class="btn btn-fab btn-round btn-primary"> <i class="material-icons">attach_file</i> </button> </span> </div> </div>
but when i click the form nothing happen. im using laravel 6
Hello @somato-tomato, thanks for using our products.
Do you have a <form>
wrapper around the code you sent?
Please see: https://www.w3schools.com/html/html_forms.asp
All the best
yes i use
.i trying to use file browser too, but its not the same like in the documentation.
here may code
<form class="form" method="POST" action="{{ url('/regpeserta/simpan') }}" enctype="multipart/form-data"> @csrf <div class="form-row"> <div class="fileinput fileinput-new text-center" data-provides="fileinput"> <div class="fileinput-new thumbnail img-raised"> <img src="http://style.anu.edu.au/_anu/4/images/placeholders/person_8x10.png" alt="..."> </div> <div class="fileinput-preview fileinput-exists thumbnail img-raised"></div> <div> <span class="btn btn-raised btn-round btn-default btn-file"> <span class="fileinput-new">Select image</span> <span class="fileinput-exists">Change</span> <input type="file" name="..." /> </span> <a href="#pablo" class="btn btn-danger btn-round fileinput-exists" data-dismiss="fileinput"><i class="fa fa-times"></i> Remove</a> </div> </div> </div> <div class="card-footer ml-auto mr-auto"> <button onclick="return confirm('Apakah data yang disi sudah benar ?')" type="submit" class="btn btn-primary">{{ __('DAFTAR') }}</button> <a type="button" style="float: right" href="{{url('/')}}" class="btn btn-primary">{{ __('KEMBALI') }}</a> </div> </form>
this is the form
https://i.postimg.cc/FRNbwLc0/error.png
Hello, please remove the onclick event from the submit button and see if it works. If not please check the javascript errors in the console, if you find any you can send the errors here.
All the best