nextcloud / forms

📝 Simple form & survey app for Nextcloud
https://apps.nextcloud.com/apps/forms
GNU Affero General Public License v3.0
324 stars 98 forks source link

Do not submit fields that not exists anymore #2312

Closed Koc closed 2 months ago

Koc commented 2 months ago

This pr aims to fix next bug. Here a reproducer:

  1. Create form with 2 questions
  2. Start filling the form but don't submit it
  3. Edit form and remove 1st question

Expected result: form successfully submitted

Actual result: there is an error on BE side

susnux commented 2 months ago

Maybe rather show a warning like: "Warning the form has changed since you last visit, do you want to restart?" As also already filled questions might have changed the wording or similar. But also maybe something to track in an issue

Koc commented 2 months ago

@Chartman123 thanx for suggestion, I've changed approach

image

@susnux yeah, we can, but let's fix issue first. BTW what component can I use for raising this warning?

Chartman123 commented 2 months ago

@Koc I'll have a look at it and test it this evening :)

Chartman123 commented 2 months ago

what component can I use for raising this warning?

You should use NcDialog like the two existing ones in Submit.vue :)