fields['maintenance']) { echo "$(function () { // look if name='helpdeskform' is present. If yes replace the form.location var ahrefTI = '".$CFG_GLPI["root_doc"]."/plugins/processmaker/front/tracking.injector.php'; var formLink = $(\"form[name='helpdeskform']\")[0]; if (formLink != undefined) { formLink.action = ahrefTI; } }); "; // end of echo }