Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Form Problem DropZone

form

Started by Bartek 9 months ago · 3 replies · 194 views
9 months ago

Hi everyone,

I'm running into an issue when trying to use Form in my project. I'm trying to load the file from md with dropzone.

When I run it in the browser, I get the following error:

TXT
Uncaught SyntaxError: Unexpected token '/'

The site was working fine before the update. I suspect it might be related to changes in how Grav handles assets or JavaScript modules.
Could anyone help me fix this or suggest a workaround?

Thanks in advance!

dropzone.md|690x338

dropzone|690x101

dropzone 2|369x64

9 months ago

@pawlikbartlomiej, For me, the information you've provided is a tad too little... Could you elaborate a bit more on:

  • What are you trying to achieve?
  • Are you talking about a form in frontend of backend (Admin)?
    • Frontend: The Form plugin has its own File field that allows you to download a file into the folder of the page.
    • Backend: There already is a download option in the page editor to download a file.
  • I have no idea what information the screenshot is showing (and please don't use screenshots...)
  • Why are you using nodejs to create a Form page to download a file?
  • Etc...

You might want to read /forum/general/the-art-of-asking-great-questions-t8554 to improve your question.

9 months ago

Based on the name sortable, I assume it's not about the file field, but rather about drag'n'drop DOM manipulation

9 months ago

Yes, exactly — it’s about the field where the user uploads files.
The problem is with Dropzone initialization.

On my local environment, everything works fine, but on production I get this error:

TXT
Uncaught SyntaxError: Unexpected token '/'

This all started happening after updating Grav to the new version; previously, updates didn’t cause any issues with this.

Suggested topics

Topic Participants Replies Views Activity
Support · by BenLaKnet, 5 days ago
1 121 2 days ago
Support · by BenLaKnet, 1 week ago
5 195 2 days ago
Support · by kskt, 2 days ago
0 44 2 days ago
Support · by David Meissner, 3 days ago
0 43 3 days ago
Support · by David Meissner, 3 days ago
3 92 3 days ago