nextcloud/forms

Linked spreadsheet: Write responses to the same worksheet every time

matthijskooijman opened this issue · 1 comments

I previously posted this as feedback on the PR before it was applied (#1758 (comment)), but since it was out of scope for the initial PR, I'm reposting this here.

Nextcloud:

  • Nextcloud-Version: 28.0.1
  • Forms-Version: 4.0.0 with PR #1758 applied

Is your feature request related to a problem? Please describe.

I'm considering to use the forms plugin as an easy way for non-technical users to contribute to a "logbook" spreadsheet. To provide additional info to regular users of the spreadsheet, I would like to add extra worksheets to the spreadsheet, containing extra instructions, or maybe more detailed info.

However, when the spreadsheet has multiple worksheets, results are written to the active worksheet (i.e. the one that was selected when the spreadsheet was saved), even when it was previously saved to another worksheet.

This was slightly unexpected, and makes adding a worksheet with instructions infeasible (unless users always make sure to switch back to the logbook worksheet, but I'm pretty sure that won't happen every time).

Describe the solution you'd like

Save the response to the same worksheet as the first time.

Maybe some worksheet ID could be saved when creating the spreadsheet and then used to save to the same worksheet every time (the worksheet title would not work so well, since users can change that in the spreadsheet).

Could you retry it with forms 4.1? Because for me it works as expected.
We always open the first sheet:

$activeWorksheet = $spreadsheet->getSheet(0);