forms
forms copied to clipboard
No entry in mandatory field => browser error message
in case of form where one or more mandatory fields are not filled in it seems like the resulting error message is rather generic (“Beim Uebermitteln des Formulars ist ein Feher aufgetreten” / error while transmitting the form) and does not point to a missing mandatory entry.
wrt kind of questions/fields, the following types have been used: mandatory: short answer + radio buttons + drop-down list non-mandatory: long text
The error message can be reproduce when not selecting an answer from a mandatory drop-down list and pressing "submit"
Expected behavior An error message like "not all mandatory fields have been filled in. PLs. revisit the form." would be expected rather than Än error has accored during submission".
Screenshots If applicable, add screenshots to help explain your problem.
Nextcloud (please complete the following information):
- Nextcloud-Version: 25.0.4
- Forms-Version: 3.2
Desktop (please complete the following information):
- OS: Windows
- Browser firefox on Windows, safari iOS, Edge on Windows
Smartphone (please complete the following information):
- Device: iPhone
- OS: iOS 16.1
- Browser: safari
Browser log
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.
ln @ globals.js:60
get @ globals.js:91
(anonym) @ publicpage.js?v=f7047bc2-43:36
dispatch @ jquery.js:5430
m.handle @ jquery.js:5234
xhr.js:220
POST https://xx.yyyyy.zzz/ocs/v2.php/apps/forms/api/v2.1/submission/insert 400
(anonym) @ xhr.js:220
e.exports @ xhr.js:16
e.exports @ dispatchRequest.js:56
d.request @ Axios.js:109
(anonym) @ Axios.js:144
(anonym) @ bind.js:9
(anonym) @ Submit.vue:272
c @ Submit.vue:105
(anonym) @ Submit.vue:105
(anonym) @ Submit.vue:105
m_ @ Submit.vue:105
o @ Submit.vue:105
(anonym) @ Submit.vue:105
(anonym) @ Submit.vue:105
onSubmit @ Submit.vue:105
submit @ Submit.vue?5d94:1
Nt @ vue.runtime.esm.js:3017
n @ vue.runtime.esm.js:1815
Kr.i._wrapper @ vue.runtime.esm.js:7473
ConsoleLogger.js:59
[ERROR] forms: Error while submitting the form {app: 'forms', level: '1', error: a}
value @ ConsoleLogger.js:59
value @ ConsoleLogger.js:85
(anonym) @ Submit.vue:280
c @ Submit.vue:105
(anonym) @ Submit.vue:105
(anonym) @ Submit.vue:105
m_ @ Submit.vue:105
s @ Submit.vue:105
Promise.then (asynchron)
m_ @ Submit.vue:105
o @ Submit.vue:105
(anonym) @ Submit.vue:105
(anonym) @ Submit.vue:105
onSubmit @ Submit.vue:105
submit @ Submit.vue?5d94:1
Nt @ vue.runtime.esm.js:3017
n @ vue.runtime.esm.js:1815
Kr.i._wrapper @ vue.runtime.esm.js:7473
=============================================================
POST
https://xx.yyyyy.zzz/ocs/v2.php/apps/forms/api/v2.1/submission/insert
Status
400
Bad Request
VersionHTTP/2
Übertragen990 B (119 B Größe)
Referrer Policyno-referrer
Anfrage-PrioritätHighest
[ERROR] forms: Error while submitting the form
Object { app: “forms”, uid: “my-user-id”, level: “1”, error: {…} }
ConsoleLogger.js:59:10
No new notification data received NotificationsApp.vue:382
Polling interval updated to 30000 NotificationsApp.vue:414
Got notification data NotificationsApp.vue:377
Polling interval updated to 30000 NotificationsApp.vue:414
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:60:15
The problem can also be reproduced for checkbox questions. In my case I only have a single checkbox for a question that is required. If I leave the checkbox empty, the form can't be sent and the generic error message appears. I'm not pointed towards the missing checkbox.
@jotoeri: I think this is related to our switch to NcSelect and NcCheckboxRadioSwitch. It seems like the required prop doesn't get to the underlying input elements. Must this be fixed in the vue lib or can we have a fix directly inside Forms?
Mhh, i'd say its more or less both.... Would indeed be useful fpr the vue lib, while the question is also, which app would use it from there. On the other hand, with #1255 we should anyways get to a custom solution...
just adding my +1 to this. Have replicated in Chrome 124.0.6367.202 on Windows 10 as an anonymous user.
User impact:
- It's discouraging/frustrating users, because they can't figure out why they can't submit the survey.
- Our survey users are all anonymous, and so if they reload the page to see if that helps, all their progress is lost and they have to fill everything out again (if they care enough; others may just give up at that point).
Thanks for considering.