TOPIC:

Edit file uploading behavior 11 months 2 weeks ago #263041

  • monomgabriel's Avatar Topic Author
  • monomgabriel
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 90
  • Thanks: 1
Great! Thank you :)

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

Edit file uploading behavior 11 months 2 weeks ago #263043

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

np, anytime :)

If you need more help, let me know

Regards,
Tihana

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

Edit file uploading behavior 10 months 3 weeks ago #263929

  • monomgabriel's Avatar Topic Author
  • monomgabriel
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 90
  • Thanks: 1
Hi Tihana!

I have worked on my topic and I almost done it!
I have still a question on bfDoFlashUpload().
Is this function breakable?

I mean, can I make it start the upload but not send the form when reaching 100%?
I want to do this because when I click on the submit button, it launches a pop-up modal.
The uploading must run in background when the pop-up appears, but the form should not be sent before the users operations on the modal are over (they will have to write down some things and select some other).

For the big files this works perfectly because the users will finish to complete the modal before the upload finishes, but for small files, the upload is too fast.

Can I do something to separate the upload action from the submit action?
Thank you!

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

Edit file uploading behavior 10 months 3 weeks ago #263938

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2957
  • Karma: 2
  • Thanks: 150
Hi,

ok, I understand what you want, I don't know does is it possible, I need a little time for investigating this, then I will back to you with a possible solution.

Regards,
Mirko

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

Edit file uploading behavior 10 months 3 weeks ago #263945

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2957
  • Karma: 2
  • Thanks: 150
Hi,

I mean, can I make it start the upload but not send the form when reaching 100%?


Yes, we can do it, I find a very easy solution for your question.
When you click on submit button, the function'bfDoFlashUpload'will be started and finished but FORM do not will be sent, we will make a delay in sec.
I tested this and works on my server.

Solution:

Please, navigate on your Form ->Advenced->More Options->Submit pieces-> End Submit and select type custom and insert this in code box below:
time_sleep_until(time()+20);

With this function we will delay submitting the Form by 20 sec, you can set up how much you want sec for the delay.

I hope that this will solve your problem.
Let me know the result!

Regards,
Mirko

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

Edit file uploading behavior 10 months 3 weeks ago #263962

  • monomgabriel's Avatar Topic Author
  • monomgabriel
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 90
  • Thanks: 1
Hello Mirko and thank you for your answer!
I also investigated by myself and found this file:
administrator/components/com_breezingforms/libraries/crosstec/classes/BFQuickMode.php

I added my own function mybfDoFlashUpload and edited it and it works as needed, the submission waits for another button to be clicked.

Here is my code :
function mybfDoFlashUpload(GrosBouton, nextButton){
                                JQuery("#bfSubmitMessage").css("visibility","hidden");
                                JQuery("#bfSubmitMessage").css("display","none");
                                JQuery("#bfSubmitMessage").css("z-index","999999");
				JQuery(".bfErrorMessage").html("");
                                JQuery(".bfErrorMessage").css("display","none");
                                for(var i = 0; i < bfUploaderErrorElements.length; i++){
                                    JQuery("#"+bfUploaderErrorElements[i]).html("");
                                }
                                bfUploaderErrorElements = [];
                                if(ff_validation(0) == ""){
					try{
						
						                    bfFlashUploadInterval = window.setInterval( mybfCheckFlashUploadProgress, 1000 );
                                            if(bfFlashUploadersLength > 0){
                                                JQuery("#bfFileQueue").bfcenter(true);
                                                JQuery("#bfFileQueue").css("visibility","visible");
                                                for( var i = 0; i < bfUploaders.length; i++ ){
                                                    bfUploaders[i].start();
                                                }
                                            }
					} catch(e){alert(e)}
				} else {
					if(typeof bfUseErrorAlerts == "undefined"){
                                            alert(error);
                                        } else {
                                            bfShowErrors(error);
                                        }
                                        ff_validationFocus("");
                                        document.getElementById("bfSubmitButton").disabled = false;
				}
			}
			function mybfCheckFlashUploadProgress(){				
                                if( JQuery("#bfFileQueue").html() == "" && GrosBouton == 1){ // empty indicates that all queues are uploaded or in any way cancelled
					JQuery("#bfFileQueue").css("visibility","hidden");
					window.clearInterval( bfFlashUploadInterval );
                                        if(typeof bfAjaxObject101 != \'undefined\' || typeof bfReCaptchaLoaded != \'undefined\'){
                                            ff_submitForm2();
                                        }else{
                                            ff_validate_submit(document.getElementById("bfSubmitButton"), "click");
                                        }
					JQuery(".bfFlashFileQueueClass").html("");
                                        if(bfFlashUploadersLength > 0){
                                            JQuery("#bfSubmitMessage").bfcenter(true);
                                            JQuery("#bfSubmitMessage").css("visibility","visible");
                                            JQuery("#bfSubmitMessage").css("display","block");
                                            JQuery("#bfSubmitMessage").css("z-index","999999");
					}

				}

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

Moderators: ForumSupport
Time to create page: 0.051 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!