title: Add additional value with row header on Googleform submit
body: <p>I want to add an extra value in the response sheet when a google form is submitted.</p>
  
  <p>I wrote a code but can not get it to work.</p>
  
  <pre><code>function onFormSubmit(e)
  {var form = FormApp.openById('11xxxxxxxxxxxxxxdk');
  var items = form.getItems();
  
   if (items[4] == "D" &amp;&amp; items[6] =="Agree")
   {items[9]="TP"}
   else if(items[4] == "D" &amp;&amp; items[6] =="Disagree")
   {items[9]="FP"}
   else if(items[4] == "A" &amp;&amp; items[6] =="Disagree")
   {items[9]="FN"}
   else if(items[4] == "A" &amp;&amp; items[6] =="Agree")
   {items[9]="TN"}
   else{}
  e.range.offset(0, 11).setValue(items[9]);
  }
  </code></pre>
  
  <p>where is the mistake in this code? Do I have to call spreadsheetApp as well to set the Value of the item.</p>
  
  <p>I realize that the I am using a pre-filled form which has a different ID and not matching the original Form.
  How Do I counter this issue.</p>