Custom forms validation with file uploads


(Ryan Archer) #1

Recently we have just upgraded to Squiz Matrix v5.3.

Had an instance today whereby a custom form was attempted and a validation error occured, but the file attachments were uploaded to the system regardless - even though the form was not able to be completed.

 

Then when the form was attempted again (and validation error resolved), an error came up saying that there was a file name conflict with the attachment. Checked the options on the file upload asset and could see that the Overwrite Rule was set to "Raise a submission error". Have now changed the overwrite rule so that it says "Rename uploaded file" so that should resolve any further issues with file name conflicts.

 

What I don't understand is how the form was able to upload the attached file(s) without the form being properly completed. Have not come across this issue before. I can see that the form has been set to server-side validation - so I changed it to be client side (browser) validation.

 

Should this resolve the issue? Should the issue be even happening when validation is set to server side?


(Anthony Ponomarenko) #2

I have attempted to replicate this issue in the latest 5.3.1.0 however it is not faulting as you described. 

 

Are you able to export the form to xml and i can take a look at how you have set it up.  


(Ryan Archer) #3

Hi Anthony,

 

I have exported the custom from using the 'Export Asset to XML' function. It is a TGZ file (about 50mb).

The file is obviously way too big to upload here so I will put it up in dropbox and send you a link to download it.

 

Please let me know when you have downloaded this file, so I can remove it from the dropbox - it's just not a type of file that should be in a cloud server.

https://www.dropbox.com/s/7l27t8oglmi3h5d/export.tgz?dl=0

 

 


(Anthony Ponomarenko) #4

Ive just downloaded it, will take a look now.


(Anthony Ponomarenko) #5

I cant import as it is too large. Why is it 50 mb? Can you delete a few assets to reduce the file size? Are there submitted assets/files that can be removed prior to export?


(Ryan Archer) #6

Sorry mate, lets just forget it.

We need to keep all the submissions within the form for government retention policy.

 

I will just accept the fact that there may be some double up submissions with unique file names.


(Bart Banda) #7

I'd suggest you send a support ticket into Squiz so we can have a look further, as there may be a bug still but we can't properly replicate it in our version with a simple set up, may be something slightly different in yours that is causing it.