2017-08-10 5 views
0

私はこのブートストラップをモデルから持っていますが、なぜボタンを送信しても何も送信しなかったとわかりません。 <form action="myPage.php" method="post" enctype="multipart/form-data">ブートストラップ - ファイル入力フォームを提出しますか?

<form action="myPage.php" class="form-horizontal form-bordered"> 
    <div class="form-body"> 
     <div class="form-group"> 
      <div class="col-md-6 col-md-offset-3"> 
       <div class="fileinput fileinput-new" data-provides="fileinput"> 
        <div class="input-group input-large"> 
         <div class="form-control uneditable-input input-fixed input-medium" data-trigger="fileinput"> 
          <i class="fa fa-file fileinput-exists"></i>&nbsp; 
           <span class="fileinput-filename"> </span> 
         </div> 
          <span class="input-group-addon btn default btn-file"> 
          <span class="fileinput-new"> CHOOSE FILE </span> 
          <span class="fileinput-exists"> CHANGE </span> 
          <input type="file" name="..."> </span> 
          <a href="javascript:;" class="input-group-addon btn red fileinput-exists" data-dismiss="fileinput"> DELETE </a> 
         </div> 
        </div> 
       </div> 
      </div> 
     </div> 
    <div class="form-actions"> 
     <div class="row"> 
      <div class="col-md-6 col-md-offset-3"> 
       <a href="javascript:;" class="btn btn-outline grey-salsa">Cancel</a> 
      </div> 
      </div> 
    </div> 
</form> 

すべてのリンクは、リンクを使用している

+0

? – Vandesh

答えて

0

は、このコードを試してみてください ">" <button type="submit" class="btn btn-default">Submit</button>とフォームをいじっているボタン提出する必要が用意されてい<div class="form-group"> <label for="exampleInputFile">CHOOSE FILE</label> ボタンを提出された <p class="help-block">Example block-level help text here.</p> </div>

<button type="submit" class="btn btn-default">Submit</button> </form>

+0

エラーが見つかりました.2: –

+0

最初にenctype = "multipart/form-data" –

+0

を忘れてしまい、アクションファイルにエラーがありました...君は –

0

は、あなたが<form action="myPage.php" class="form-horizontal form-bordered"

+0

">"はここだけで、私の元のコードでは見逃しています。 –

+0

ボタン提出も機能しません –

+0

ファイルをアップロードするために、method = "post" enctype = "multipart/form-data"を追加してください、imean '

' –

関連する問題