2017-03-24 9 views
0

Coldfusionのアクションページに送信するHTMLフォームがあります。なんらかの理由で、フォーム構造体が入ってこないのですか? 2つのファイルindex.cfmadd.cfmは、両方とも同じディレクトリにあります。フォームを送信すると、処理ページのテストテキストが表示されますが、フォームは表示されません。また、CFデバッガのフォーム変数も表示されません。フォームがcoldfusionに値を送信しない

私には何が欠けていますか?

index.cfmに

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="UTF-8"> 
    <title>Video Slideshow Admin</title> 
    <!--- <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> ---> 
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 
<style> 
h1 { 
    font-size: 34px; 
} 
h2 { 
    font-size: 26px; 
} 
.yt-container { 
    padding: 2% 5%; 
    max-width: 1400px; 
    margin: 0 auto; 
} 
.input-short { 
    max-width: 200px; 
} 
.input-shorter { 
    max-width: 100px; 
} 
.input-med { 
    max-width: 500px; 
} 
.input-long { 
    max-width: 800px; 
} 
</style> 
</head> 
<body> 

    <div class="yt-container"> 
    <h1>Video Slideshow Admin</h1> 

    <!-- form --> 
    <h2 class="form-title">Add Video</h2> 

    <p class="required">* Required</p> 

    <form name="vidform" action="add.cfm" method="post"> 

     <div class="form-group"> 
     <label for="heading">Heading</label> 
     <input type="text" class="form-control input-med" id="heading" placeholder="Heading" value=""> 
     </div> 

     <div class="form-group"> 
     <label for="url">Embed URL*</label> 
     <input type="text" class="form-control input-long" id="url" placeholder="Embed URL" value="" required> 
     </div> 

     <div class="form-group"> 
     <label for="status">Status</label> 
     <select class="form-control input-short" id="status"> 
      <option ng-selected="formData.type == null">Select</option> 
      <option value="show">Show</option> 
      <option value="hide">Hide</option> 
     </select> 
     </div> 

     <div class="form-group"> 
     <label for="order_seq">Order Sequence</label> 
     <input type="text" class="form-control input-shorter" id="order_seq" placeholder="Order" value=""> 
     </div> 

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

    </form> 

    </div> 

</body> 
</html> 

add.cfm

We are here 
<cfdump var="#form#"> 
<cfabort> 
+0

言い難いために同じことを行きます。 –

答えて

5

入力が同様にname属性を必要とするすべてのフォーム。

これは、フォームの投稿時にColdfusionが探しているものです。

ので:

<input type="text" class="form-control input-med" id="heading" placeholder="Heading" value=""> 

は次のようになります。あなたが質問を乱雑にすべてのことは無関係スタイリングコードを持っているので、

<input type="text" class="form-control input-med" id="heading" name="heading" placeholder="Heading" value=""> 

これは<select>チェックボックス/ラジオ

+0

ああ!私の愚かなことです...ありがとうございました – mhatch

+0

@mhatch - どのコントロールを送信できるかについての他のルールについては、仕様を参照してください。 [17.13.2-成功したコントロール](https://www.w3.org/TR/html401/interact/forms.html#h-17.13.2) – Leigh

関連する問題