Reputation: 141
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.)
I've managed to create pre-filled forms for each row with Is it possible to 'prefill' a google form using data from a google spreadsheet? and How to prefill Google form checkboxes?. (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).
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).
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?
Update:
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:
Then
So the temp 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.)
Upvotes: 1
Views: 5950
Reputation: 38200
The pre-filled URL allways will create a new form response. Instead you should use the URL returned by getEditResponseUrl(). For details see this other question
How do I edit the response of a form submission in Google Forms/Sheets?
Upvotes: 1