No entry in mandatory field => error message

Hi,

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.

Is this correct or can ths be configured/set?

using NC25.0.4 with forms 3.2

Thanks and kind ergards - tullsta

Hi @tullsta,

I’ve just tried to reproduce your problem but wasn’t successful. Could you please tell us more about your setup? (Browser, browser logs, server logs)?

Hello Christian,

I reproduced this on iOS and Edge.
Here the browser-log of that specific event.

PLs. let me know if you need anything more and/or if I should try something lese.

Thanks + LG - tullsta

   $ 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

@tullsta thank you :slight_smile: Just another quick question: are you logged in or is this a shared form that you access without being logged in?

Hi,

to be honest, up to now I ony checked with anynymously shared link.
But I just tried whenbeing logged in and I got the same issue.

Thanks for looking into this and kind regards - tullsta

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

Ok, I think I’m closer to the problem now. What kind of fields do you use in your form? For me I could reproduce it with checkboxes whereas text fields work fine.

Could you please head over to Github and file a new Issue with all the details? Thank you very much :slight_smile:

Hi,

wrt kind of questions/fields:
mandatory: short answer + radio buttons + drop-down list
non-mandatory: long text

I can reproduce it when not selecting an answer from a mandatory drop-down list.

HTH + kind regards - tullsta

Reporting the same problem and its negative impact on users who get frustrated and give up. I would appreciate knowing if the error message can be edited.

A. When a question is mandatory on a Form, there are different error messages depending on the type of question when the user OMITS one of those mandatory questions and tries to SUBMIT:

  1. If Checkboxes or Radio button, the Form jumps to the top of the page and a notification in the upper right corner says “There was an error submitting the form.” This gives the user no indication of what to do to fix the problem.

  2. In contrast, if the question type is Short-answer or Long text, the app helpfully jumps to the specific question whose answer is missing with a notification saying “Please fill out this field”

  3. I have not exhaustively tried all question types, just these 3.

B. Impact: Users try fruitlessly to submit the survey and if they reload the page, all their progress is lost because Forms does not auto-save.

link to GitHub issue opened last year: No entry in mandatory field => browser error message · Issue #1586 · nextcloud/forms · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.