TOPIC:

Re: Attachment File Size Restriction 2 weeks 16 hours ago #250513

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 2202
  • Karma: 3
  • Thanks: 198
Hi,

Ok. I remove that part of code. So if you upload file size > 5MB, warning message will shown
function ff_NAMEOFYOURUPLOAD_validation(element, message)
{
 elem=element.files[0];
if (elem.size>5437505) { // change 8000 to the value you need
if (message=='') message = elem.size+" faild in my test.\n"
ff_validationFocus(element.name);
return message;
} // if
return '';
} // ff_NAMEOFYOURUPLOAD_validation

Let me know if it works for you

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Re: Attachment File Size Restriction 2 weeks 14 hours ago #250526

  • genegun2
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 0
Thanks but it doesn't work. Adding it renders the entire form unresponsive.

Please Log in or Create an account to join the conversation.

Re: Attachment File Size Restriction 2 weeks 14 hours ago #250528

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 2202
  • Karma: 3
  • Thanks: 198
Hi,

can I access to your backend and solve this?
If yes, please send me backend link and login information.
Use this tag:
[confidential]
//your info here
[/confidential]

With this tag only forum moderators can see information.

Also, write here name of your form

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Re: Attachment File Size Restriction 2 weeks 13 hours ago #250531

  • genegun2
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 0
Hi,

There you go
This message contains confidential information


Form name: NewsSubmission
I have added a single upload filed, which allows multiple uploads.

I tried again with 3 images and I got a Forbidden access (Flooding) error

Thanks

Please Log in or Create an account to join the conversation.

Re: Attachment File Size Restriction 2 weeks 13 hours ago #250532

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 2202
  • Karma: 3
  • Thanks: 198
Hi,

With the code from message above we can make that someone needs to enter a image
function ff_bfQuickMode7230805_validation(element, message)
{
elem=element.files[0];
if(element.value==' '){
if (message=='') message = "Please upload at least one picture"
ff_validationFocus(element.name);
return message;
}else{
if (elem.size>5437505) { // change 8000 to the value you need
if (message=='') message = "Image 1 is too large. Size must be below 5MB"
ff_validationFocus(element.name);
return message;
} // if
}
return '';
} // ff_bfQuickMode7230805_validation
Also with this code you can leave maxfile size to 0 in file upload's Advanced, because we set everything up with this code

This code you can use for default upload->not for HTML5, for HTML5 you should to set Allow max file size in file upload->Advanced
And set validation ff_flashuploadnotempty

Please test this, and get back to me

EDIT: Solved in other post

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.
Moderators: ForumSupport
Time to create page: 0.087 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!