title: Make rows of a Google spreadsheet editable in a Google form
body: <p>I'm looking for a way to edit a large Google spreadsheet collectively via a form for each row in the spreadsheet. (I don't want to simply give access to the spreadsheet to everyone because some fields have multiple lines and are a bit hard to edit directly inside of the spreadsheet.)</p>
  
  <p>I've managed to create pre-filled forms for each row with <a href="https://stackoverflow.com/questions/20108511/is-it-possible-to-prefill-a-google-form-using-data-from-a-google-spreadsheet?noredirect=1&amp;lq=1">Is it possible to &#39;prefill&#39; a google form using data from a google spreadsheet?</a> and <a href="https://stackoverflow.com/questions/26393556/how-to-prefill-google-form-checkboxes">How to prefill Google form checkboxes?</a>. (and I then can create a view as an Awesome-table with a button for each row which opens the pre-filled form corresponding to the row).</p>
  
  <p>But the responses do not update the existing rows but add a new row (at row 2 strangely enough, protecting the headers, but messing up the Awesome-table that needs filter information in row 2).</p>
  
  <p>How can I make a pre-filled form that writes at a specific row of a sheet? If possible the same row that the pre-fill was created from. Maybe with some script that is triggered by the submission of the form and which replaces the standard recording? Or is there a completely other way to edit Google spreadsheets by means of forms?</p>
  
  <hr>
  
  <p><strong>Update:</strong></p>
  
  <p>This was much harder than expected and I finally got back to it. Here is what I ended up hacking together:
  A spreadsheet document document with three sheets:</p>
  
  <ul>
  <li><em>main</em>: The main data</li>
  <li><em>temp</em>: only used for the automatically added entries after submission</li>
  <li><em>links</em>: keeping the editing links and response ids corresponding to each line of the main sheet</li>
  </ul>
  
  <p>Then</p>
  
  <ul>
  <li>A function that can be triggered from the menus: creates a prefilled answer per line of <em>main</em>, submits, and puts the url and id in the <em>links</em> sheet. These links are distributed to different people who are asked to update the prefilled information of their row by means of the form.</li>
  <li>A onFormSubmit function attached to the form that 
  
  <ul>
  <li>searches for the line with the right response id in <em>links</em></li>
  <li>updates the corresponding line in <em>main</em></li>
  </ul></li>
  </ul>
  
  <p>So the <em>temp</em> sheet is not used at all, all entries are handled manually. What I haven't managed to do is to allow a manual change in the main table and to resubmit the data under the same id. (I don't want to make a completely new response because the links are already distributed.)</p>