Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By cosyxu
#812928
Good morning,

I am using web-entry form and ABE function for my process.

I have a process which contains ABE function(Link to a form).

I was wondering is it possible to change the title of the "ABE" button in the email for different processes? By default, its title is "Please complete this form", I think if I change the title for ABE email template, all my process will use this ABE email template. So it is possible to update titles of ABE buttons for different process?

Thanks,
Yuan
User avatar
By amosbatto
#812930
In workflow/engine/classes/class.actionsByEmailCore.php,
change line 201 from:
Code: Select all
                                    $__ABE__ .= '<a href="' . $link . 'DataForm?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&DYN_UID=' . G::encrypt($configuration['DYN_UID'], URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Please complete this form</a>';
To something like:
Code: Select all
                                    if (PROCESS == '1234567890abcde1234567890abcde') {
                                       $labelInForm = 'Click to submit application';
                                    }
                                    elseif  (PROCESS == 'abcde1234567890abcde1234567890') {
                                       $labelInForm = 'Click to update client';
                                    }
                                    else {
                                       $labelInForm = 'Click to update client';
                                    }
                                    $__ABE__ .= '<a href="' . $link . 'DataForm?APP_UID=' . 
                                        G::encrypt($data->APP_UID, URL_KEY) . 
                                        '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&DYN_UID=' . 
                                        G::encrypt($configuration['DYN_UID'], URL_KEY) . '&ABER=' . 
                                        G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">'.
                                        $labelInForm.'</a>';
By cosyxu
#813103
cosyxu wrote:Thanks for the solution Amo,

Can I ask what is the variable name for process? and how can I get it?
Code: Select all
 if (PROCESS == '1234567890abcde1234567890abcde')

Thanks,
Yuan
Solved by using this:
Code: Select all
 $processId = $_SESSION['PROCESS'];

However, it is essential to use it responsibly and[…]

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]