• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Fileupload element notempty validation not working

Guys,

I have a file upload element and I want the user to always attach a file here so I am using the notempy validation plugin on the form but the plugin always fires "This is a required field" even when I have uploaded a file. See attached screen shot.

Does anyone how to fix this? I am thinking I can also write code using PHP validation plugin but I don't know how to handle files using php (e.g. how to get the file from the form and check if there is anything loaded)

Please assist.

Kind regards
Simon
 
Hugh,

This is a regular upload. By "Ajax" you are asking if I have enabled the form to use Ajax. Well the form is not enabled for Ajax.

Regards
Simon
 
Hi,

No I have just checked the Ajax option and its not enabled for Ajax i.e. not multiple uploads. See attached screen shot
Not ajax upload.PNG

What do think its the issues?

Regards
Simon
 
The file upload "notempty" validation is a very complex one, and I know we haven't quite gotten it right yet.

Does it behave the same on:

A new form, when you don't upload anything.

An edited form, where there is no already uploaded file, and you aren't uploading one.

An edited form, where there is an already uploaded file, and you aren't uploading a new one.

-- hugh
 
Hugh,

It behaves different. In the first 2 i.e. new form and edited for but no already loaded file, it fires "This is a required field" whether you have uploaded a file or not. However in the 3rd case of an edited for which has an uploaded file and you are not trying to upload a new one, then this one works okay i.e. does not show "This is a required field" I think because there is an already existing file.

Does this help?

Regards
Simon
 
OK, I can't replicate this.

Here's a screencast where I create a new form, don't upload, it fails. I add an upload, it works. I edit, and submit again without adding anything, it works.

The only test case this doesn't show is where an existing form without an already uploaded file is submitting without uploading, but I know that works as well, as I tested it before my last post.

Are you running relatively a relatively recent version of Fabrik? I did some work on upload validation for 3.5.,1, I think.

-- hugh
 
Ah, OK. AJAX validation won't work for file uploads, as the file doesn't actually get uploaded till the form is submitted.

That's one of the things I'm working on. I'll see if I can work up a solution soon.

-- hugh
 
It's nasty. And I've been swamped with getting the latest build out ... and now having to do a 3.5.3 to fix a couple of issues with 3.5.2.

-- hugh
 
Hugh,

I trust you are well. Did you ever get around fixing the AJAX validation issue on "Notempty" validation for file uploads. See details and your promise. I am getting to a stage that this has become quite important for the functioning of my application.

Please let me know if you can help me out

Regards
Simon
 
I don't recall making any promises. I said I'd see if I could work up a solution. I've tried a couple of approaches, I've got a couple more ideas I can try.

Sent from my HTC6545LVW using Tapatalk
 
Hugh,

Yes you did not promise, apologies for that English is not my first language. Thanks for all your assistance so far it has really been helpful. Please let me know if you do crack it.

Kind regards
Simon
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top