cancel
Showing results for 
Search instead for 
Did you mean: 
bimi82
Nintex Newbie

Message after submiting a form

Jump to solution

Hello

I am trying to implement a "pop up / alert" message after a form has been submitted and passed the validations.
The form runs some validations checks and then if the criteria is fulfilled : it will submit the form based on a workflow.

At the moment (because of the workflow taking its time) once the form is submitted, it remains blank and does not give any confirmation or alerts indicating that there is a process running and needs waiting until it has been finalised.

User's feedback are

- I don't know what is happening

- not sure if it the page frozen or crashed

- maybe I need to create a new request

Therefore, I thought to implement some sort of a message that tells the user "ok, it has been submitted and just wait until the process has finished..." of course in a more neat / prof. statement.

Yes, there is an option under Advanced> "Confirmation message" but that does not do fulfill my intention.

However, there is also another option called Client Click and makes me wonder if that is the same but in JS format?!

the pop up shows up as soon as Submit button is clicked.

Hereafter, a blank page is being shown (until the WF is processed in the background)

What I like to show is a popup or message as following:

Is something like this possible?!

Reply
9 Replies
praios81
Nintex Newbie

Re: Message after submiting a form

Jump to solution

You can try the following. Go to Forms settings and add the following custom javascript:

function waitMessage() {
window.parent.eval("window.waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('This should not take long.', '', 90, 450);");
}

Afterwards go to your button settings and set the following as Client click in the advanced section

waitMessage()

Now publish and test saving.

Is this what you searched for?

Kind regards

Enrico

Reply
bimi82
Nintex Newbie

Re: Message after submiting a form

Jump to solution

Yep, that is what I am after
However, it does not consider the validation rules.

Meaning, even if the rules are not meat, it still shows the waitMessage.
Ideally, it should only move to the next step IF the rules has been met.

This is what it shows now and the trouble is, it cannot be clicked away / closed .
Hint: maybe changing the WaitScreenWithNoClose to WaitScreenWithClose

Reply
praios81
Nintex Newbie

Re: Message after submiting a form

Jump to solution

Ah I see. Didn't think of that. In that case I think you will have to write the whole validation on your own as custom validation but I'm too bad at JavaScript to give an advice about this. Hopefully someone from the community has another clue.

Reply
bimi82
Nintex Newbie

Re: Message after submiting a form

Jump to solution

No worries, I seem to have found the solution.
See this link: https://community.nintex.com/thread/5756

The Page_ClientValidate(); does the trick

function waitMessage()

{
   Page_ClientValidate();
   if(Page_IsValid)
   {

    SP.UI.ModalDialog.showWaitScreenWithNoClose('PLEASE WAIT', 'The request is being processed...');
    return true;

   }

   else

   {

      return false;

   }

}

Reply
Automation Master
Automation Master

Re: Message after submiting a form

Jump to solution

add a pause action at the very beginning of your workflow. submit action will proceed much faster and you will need likely any no extra message/confirmation.

read following blog for reasons  

Reply
bimi82
Nintex Newbie

Re: Message after submiting a form

Jump to solution

Hi Marian

Why the message is relevant:

As explained above, there are a lot of users who do not know what just happened when they click on submit button! They assume it has not worked and a lot of times they create duplicate workload or assume it has crashed etc.

Therefore a message would provide them a message that it is in process

Back to your suggestion:

The Pause Action adds (a least) 5minutes before the workflow starts the process. I also had a Waiting action within the Workflow which I disabled (for testing purposes) and moved the Query action right at the top > this seems to make the process faster.

Current issue:

Would you or anybody else be in a position to help with the following marked in red:

function waitMessage()
{
   Page_ClientValidate();
   if(Page_IsValid)
   {
    var value = SP.UI.ModalDialog.showWaitScreenWithNoClose('Working on it...');
    setTimeout(function() { value.close(); }, 5000);

    return true;
   }
   else
   {
      return false;
   }
}

The setTimeout() is supposed to close down the variable value after 5000ms (5sec) but it does not do it at all.
Whereas changing 5000 to 1000 > it works but only for like 1 second which is a bit too short....

Any ideas?!

ps: also tried with window.setTimeout()

Reply
Automation Master
Automation Master

Re: Message after submiting a form

Jump to solution

as you like, you know your requirements...

not sure whether you tested it or not, but the idea behind what I've suggested is, that after a user submits form that  blank screen disappear quit quickly and user is navigated to the list (if not configured different way) where is can see listed his/her request. therefore I mentioned you might not need any message.

you are right, workflow itself effectively runs with a delay, but that's not recognized by a user who submitted the request/item.

and usually such a delay plays no role.

reg. your javascript code, you ask about, it (should) works on its own (meaning not triggered by a form submit action).

the reason why it doesn't work on form submit event is (IMHO - haven't investigated that) that browser is waiting on server response for submit action (blocking all the other events) and 5sec timer expires just after that. so that kind of hack is not going to be of help for you.

Reply
bimi82
Nintex Newbie

Re: Message after submiting a form

Jump to solution

Hmmm, I already tried with even 10 sec and 20 sec the result is the same.
The dialog box never disappears > when editing + saving a form.

Will see what else can be done, otherwise as a last option would be to split the workflow into two steps:

1) first step does the Reference ID and update status

2) second step does the query and utilises the Flexi Assign Task

0 Kudos
Reply
Stonehage
Nintex Newbie

Re: Message after submiting a form

Jump to solution

Hi, this worked fine for me except that it no longer validates the form. It seems to now ignore validation rules I put in place for empty fields.

0 Kudos
Reply