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.
#813576
I have a task with two steps, 1st step is a form for user to fill in, 2nd step is output document generated based on the form input and for user to download and save. Then the task will be routed for manager's approval.

As requested by user, I hide the routing window in this task, so after the output document step, the task will be routed and page will go back to inbox view in PM. My user is not satisfied with the default "Next Step" button shown in the output doc step, as they think it's misleading and want to change the button to "Submit". Is it possible to customize this button's text using any trigger? Thanks!
#813578
How to change phrases inside the ProcessMaker interface.
    [*]Download and install [url=https://poedit.net/download]PoEdit[/url]. [*]Then, go to [b]Admin > Settings > Language[/b] in the ProcessMaker interface. Select the language being used (which in your case is "English") in the list of available languages and then click on the [b]Export[/b] button. It will take ProcessMaker several minutes to export all the phrases in a [b].po[/b] file. [*]Save the generated [b].po[/b] file on your computer and then open it with PoEdit for editing. [*]Search for the text to be changed. The phrase may be repeated in multiple IDs and LABELs, so search through the entire [b].po[/b] file for it. In your case, change the text of ID_NEXT_STEP from "Next Step" to "Submit". Then save your changes in PoEdit. [*]Then, return to ProcessMaker and go to [b]Admin > Settings > Language[/b] and click on "Import" to import the [b].po[/b] file into ProcessMaker. It will take a couple minutes to import all the new phrases into ProcessMaker. [*]Then, go to [b]Admin > Settings > Clear Cache[/b] and click on [b]Clear Cache[/b]. Now the new text should appear in the ProcessMaker interface. If it doesn't, then [url=http://www.refreshyourcache.com/en/home/]clear your web browser's cache[/url] and reload by pressing [b]CTL+F5[/b] or [b]CTL+SHIFT+r[/b] in your web browser.
#813606
vitaminxu wrote:Thanks for the solution! But I suppose this will change all the "Next Step" button in my PM platform right? But I only want to change the button in one particular step. So this is not possible?
If you only want to change it for a single Output Document, then go to the list of your Output Documents and click on the Show ID button and copy it.
Then, edit the file workflow/engine/xmlform/cases/cases_ViewOutputDocument3.xml with a plain text editor and change the code from:
Code: Select all
  <JS type="javascript"><![CDATA[
var nextStep = function(oForm)
{
  oForm.action = 'cases_NextStep';
  oForm.submit();
};
]]></JS> 
To:
Code: Select all
  <JS type="javascript"><![CDATA[
if (location.href.search('4650953735a9f3baa86d2d2011256203') != -1) {
   getField("NEXT_STEP").value="Submit";
}
var nextStep = function(oForm)
{
  oForm.action = 'cases_NextStep';
  oForm.submit();
};
]]></JS> 
Where 4650953735a9f3baa86d2d2011256203 is the ID of your Output Document. If you don't see the changed text, then go to Admin > Clear Cache and select all options to clear the cache.

Nice post and please provide more information. Tha[…]

The step by step guide to convert MBOX files to P[…]

Starting a business in a white-label NFT marketpla[…]

Well if you are a startup who has a dream to build[…]