I've created a User form in spreadsheets & I'm using document.getElementById("Cell Name") to input data under input-field of a given name when the submit button is clicked. However, the document.getElementById("cell name") is not inputting the data in the correct column.
document.getElementById incorrect colmun placement
The rest of the code fucntions but the data isn't going in the correct position. Example: I want Time In data to go in "Time In" colmun. The document.getElementById("name") is putting data startingin Column A, but I want to get enter data starting in Column D-H.:
<div class="row">
<div class="input-field col s6">
<i class="material-icons prefix">access_time</i>
<input id="Time In" type="text" class="validate">
<label for="Time In">Time In</label>
</div>
<div class="input-field col s6">
<i class="material-icons prefix">access_time</i>
<input id="Time Out" type="text" class="validate">
<label for="Time Out">Time Out</label>
</div>
<div class="input-field col s12">
<i class="material-icons prefix">assignment</i>
<input id="PK Number" type="text" class="validate">
<label for="PK Number">PK Number</label>
</div>
<div class="input-field col s12">
<i class="material-icons prefix">assignment_turned_in</i>
<input id="Check" type="text" class="validate">
<label for="Check">Check</label>
</div>
<div class="input-field col s12">
<i class="material-icons prefix">pages</i>
<input id="# of Pages" type="text" class="validate">
<label for="# of Pages"># of Pages</label>
</div>
<div class="input-field col s12">
<button class="btn waves-effect waves-light" id="btn">Submit
<i class="material-icons right">send</i>
</button>
</div>
</div><!--END ROW-->
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script>
var Time_In_Field = document.getElementById("Time In");
var Time_Out_Field = document.getElementById("Time Out");
var PK_Number_Field = document.getElementById("PK Number");
var Check_Field = document.getElementById("Check");
var Number_Of_Pages_Field = document.getElementById("# of Pages");