Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#795959
Hi all,
I'm evaluating ProcessMaker 3.2 in the hosted version.
My boss insists that we could only use the software if there is any way to customize or at least translate the information screen that is shown after creating a case via web entry.

Since we use the hosted version I can't modify the xxxPost.php files. When trying to redirect via G::Header I get an error message, that no XML data could be received.

I would appreciate if anyone could guide me on how to customize or translate the info screen.

Greetings,
Matthias
#795962
I see that you already figured out that you need to change this file:
<INSTALL-DIRECTORY>/shared/sites/<WORKSPACE>/public/<PROCESS-UID>/<STARTING-EVENT-UID>Post.php
These examples might help you:
viewtopic.php?f=41&t=712867&p=794179&hi ... ry#p794179
viewtopic.php?f=41&t=713347

Note: If you change the settings of your web entry, the xxxxPost.php file will be overwritten, so make a backup.

If you are a client that is paying for hosting service with ProcessMaker, Inc., you can give us the custom xxxPost.php file to place on the server. If you aren't planning on using our hosting service, then you should probably do your own installation of PM on your own server so you can do these modifications.

If all you want to do is submit the web entry form and then redirect to another page, then you can add this JavaScript to your DynaForm:
Code: Select all
if ($("#dyn_forward").length) {
  $("#dyn_forward").parent().hide();
}

$("#redirectButton").click(function() {
   $("form").submitForm();
   location.href = "http://example.com/"; //change URL
})
Where "redirectButton" is the ID of a generic button.

Here is a sample process that you can try:
(28.57 KiB) Downloaded 319 times
The problem with using this JavaScript is that there is no way to know the case number and assigned user of the case that was just created. If you want that information, the only solution is to change the xxxxPost.php file.
#795964
Good morning and thank you very much for your help which is appreciated very much.

There seems to be one little problem with our code:
Running only the code you provided I get redirected to the desirec webpage but no new case is created in ProcessMaker. I could solve that problem by integrating a tiny relay into the code:
Code: Select all
$("#submitRequestCustom").click(function() {
  $("form").submitForm();
  setTimeout(function(){location.href="http://www.ba-com.net";}, 1);                                    
})
Is this solution the way to go? Or did I miss something with the code you provided?

Greetings and thanks again,
Mattias
#795969
mkloepper wrote:Running only the code you provided I get redirected to the desirec webpage but no new case is created in ProcessMaker. I could solve that problem by integrating a tiny relay into the code:
Code: Select all
$("#submitRequestCustom").click(function() {
 $("form").submitForm();
 setTimeout(function(){location.href="http://www.ba-com.net";}, 1); 
})
Is this solution the way to go? Or did I miss something with the code you provided?
Yes, it's a good idea to use a timeout.
It's strange that I didn't see that problem, but I'm working on a laptop with a Celeron processor, so maybe it takes my computer longer to execute the JavaScript than yours.

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]