• Resolved ryanothelo

    (@ryanothelo)


    Hi!
    I’m currently working on a page in our website and it appears to me that upon setting the file size for file upload, when trying to submit the form, it doesn’t give a more intuitive / more specific error message when I try uploading a file larger than the specified limit.

    In the website that I linked above, I’ve set a maximum of 5mb for a single file. When trying to submit the form, it doesn’t submit but the only error it’s returning is:

    “An error occurred when processing the form. Please try again.”

    Can anyone help me in setting a custom message? Or possibly point a location where can I can hook a custom function? And the function to hook as well? Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ryanothelo

    I hope you’re well today!

    If you include the file smaller than the set limit or submit the form without any upload (if upload is not set to be required) – does it work?

    The error that you are getting suggests that there’s something else failing. If it was only about the file size, the main message by default should be “Error: Your form is not valid, please fix the errors!” and there should additionally be a warning showing up next to the upload field about maximum allowed file size.

    Also, such errors would only happen if upload field is set to “Single” or to “Multiple” but with upload method not set to Ajax. If it’s set to “Multiple” and method is “Ajax” then with file bigger than the limit the size warning would show immediately and it would not be possible to even submit the form.

    The “An error occurred…” error is more of a generic error that shows up when there is a general issue with submission and plugin couldn’t directly identify what that issue is.

    —-

    That being said, I’m aware this isn’t a direct response to your question about setting better error message but the thing is we first need to identify why exactly the error shows up – as it’s not the expected upload error.

    Could you please:

    1. try switching upload field to “Multiple” (you can then set file number limit to 1 if you only want to allow single file) and then switch upload method to “Ajax” and see if that changes anything?

    2. then additionally see if switching form loading method (in “Behavior” settings) changes anything

    3. would you also, please, share the export of the form with us so we could test on our end?

    To share form export:

    – go to the “Forminator -> Forms” page in your site’s back-end
    – click on the little “gear” icon next to the form in question
    – select “Export” option
    – and either put an export code at https://pastebin.com service or export file at your Google Drive, Dropbox or similar
    – and include direct (publicly viewable) link to it in your response below.

    Note: export will NOT include any submitted data (we don’t need it either); it’s only a form configuration.

    Best regards,
    Adam

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ryanothelo

    I hope you’re well today!

    We didn’t hear back from you for a while so I’m marking this as resolved for now.

    If you still need help, please feel free to update us here and we’ll assist you further.

    Kind regards,
    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Better Error Message’ is closed to new replies.