Reputation: 7397
I am trying to save form variables from my two date fields which are just normal <input type='text' id="StartDate" value="" />
but for some reason when I dump the form variables using <cfdump var="#form#">
it is not showing that they exist.
Page 1
<form name="generatereport" method="post" action="_location_queries.cfm">
<select name="Location" id="loc" multiple="multiple">
<!---<option selected value="">Select location</option>--->
<option value="OPERATIONS">Operations</option>
<option value="CCC">Contact Center</option>
<option value="QA">QA Department</option>
<option value="DS">DeSoto</option>
<option value="PS">Palma Sola</option>
<option value="LWR">Lakewood Ranch</option>
<option value="NR">North River</option>
<option value="SDL">SDL</option>
</select>
<button id="add" type="button">ADD ALL</button>
<button id="rem" type="button">REMOVE ALL</button>
<textarea id="selected"></textarea>
<br /><br />
<label for="StartDate">From</label>
<input type='text' id="StartDate" value="" />
<br /><br />
<label for="EndDate">To</label>
<input type='text' id="EndDate" value="" />
<br /><br />
<input type="submit" name="submit" value="Continue" />
</form>
Page 2
<cfdump var="#form#">
<cfdump var="#variables#">
<cfset date1 = #CREATEODBCDATETIME(form.StartDate & '00:00:00')#>
<cfoutput>#date1#</cfoutput>
Upvotes: 0
Views: 104
Reputation: 20804
The input fields need a name attribute. You only have an id attribute.
Upvotes: 4