表示不向coldfusion提交值

时间:2017-03-24 14:26:01

标签: html forms coldfusion

我有一个提交到Coldfusion操作页面的HTML表单。由于某种原因,表单结构不通过? 2个文件index.cfmadd.cfm都在同一目录中。当我提交表单时,处理页面中的测试文本显示,但不显示表单。我也没有在CF调试器中看到表单变量。

我错过了什么?

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>

1 个答案:

答案 0 :(得分:5)

每个表单输入也需要apiKey maxCount id userid requestFields 属性。

这是Coldfusion在您发布表单时所寻找的内容。

所以:

name

变为:

 <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=""> 和checkbox / radio

的情况相同