Skip to main content

This post is something of a rant and also a general hope that someone may be familiar with this situation...

 

We have a very complex form that has a lot of rules that run when the submit button is clicked.  And sometimes these rules are running and the user is receiving absolutely no feedback.  Like I'll see a spinner, then it'll disappear and it'll return back to the form but it's still running rules because it'll flicker and maybe the spinner will come back, and this behaviour will continue until finally it submits and gets to the last two rules which is showing the user a confirmation message and closing the page/redirecting them to another page.

 

This is a huge pain in the butt, because if the user is on a slow computer or on a slow network connection, they may not realise the form is still "doing stuff" and just close the page.  Disabling the submit button only stops them from trying to submit it again.  I can't do anything to stop them from closing the page or clicking a bookmark while rules are still running.

 

I have yet to really pinpoint what specific rules or operations cause spinners to appear and disappear to consider changing my rule logic to accommodate it.  Ideally I'd like to run all my submit rules under one spinner run, but we as SmartForm builders don't seem to have any control of what triggers those spinners.

 

Has anyone observed this type of behaviour on their more complex forms?  If so, what have you observed about what triggers them?

 

Yes, I see this issue all the time. Not much you can do about the spinners (except turn them off, which doesn't help). What I tend to do is add a hidden view with just a label saying "Submitting, Please Wait..." or something similar. Then on the submit rule in the form the first thing I do is hide the main view and show the hidden view.


Yoh Vic,

 

I've done a tonne of work around this lately, as the user experience is very important to me.

 

When doing things likes Form loads and Button submits, the forms/spinners can just hang the form while they trigger.

 

Some of the things i've done to keep the users "entertained" is:

 

1) using hidden views for example saying "Please wait, ya know K2 is slow"while the rules are triggering.

2) changing some control behaviour to Async where possible (like autcompletes)

3) redirecting to other forms

4) flashing text to distract them.

 

Two things on my wish list of entertainment, which i'd like to crack are:

 

a) a countdown timer (like k2 use for the form load after a service restart) for using while rules are triggered

b) a javascript / embedded) game of ping pong while the form does its stuff


This is the perfect example where a K2 Or benchmark execution times for each of the Views/SMO's can be reviewed to see what is the expensive query that is causing delay.

 

If is way to many views to update, perhaps make sure the validations are run prior to execute the updates and like a trick I also have a rule to hide buttons to prevent double sumbit and execution of rules.

 

Interesting post, now we are reaching the point of performance and increase efficiency with K2. Just for curiosity what version of K2 are you talking about Victoria ?

 

Dino.


Hi Victoria,


 


There is a way to invoke a spinner on a form by injecting code onto the page via Transfer Data on a Literal Data Label, after clearing it first.


 


Create:


$('body').append('<div id="customSpinner" class="base0 ajaxLoader modal-element" style="left: 0px; top: 0px; width: 100%; height: 100%;"></div>');


 


Then to remove the spinner, let’s say after the last rule:


 


$('#customSpinner').remove();


 


Kallie


 


Reply