Page 1 of 1

Fill to a form(Change ABE Title)

Posted: Tue Jan 23, 2018 8:53 pm
by cosyxu
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

Re: Fill to a form(Change ABE Title)

Posted: Tue Jan 23, 2018 9:19 pm
by amosbatto
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>';

Re: Fill to a form(Change ABE Title)

Posted: Tue Feb 06, 2018 6:04 pm
by cosyxu
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

Re: Fill to a form(Change ABE Title)

Posted: Tue Feb 06, 2018 6:47 pm
by cosyxu
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'];

Re: Fill to a form(Change ABE Title)

Posted: Tue Feb 06, 2018 9:15 pm
by amosbatto
PROCESS wasn't defined there? That's strange. It should be defined as the Process ID. Maybe it doesn't work in plugins which are loaded differently than normal code.