Redirect trigger

HelgeLind
Posts: 2
Joined: 2012-10-02 20:52

Redirect trigger

Postby HelgeLind » 2012-10-02 21:05

Hi

There is something I like to do if is possible?

//start Trigger_Redirect trigger
//remove this line if you want to edit the code by hand
function Trigger_Redirect(&$tNG) {
$redObj = new tNG_Redirect($tNG);
$redObj->setURL("/this_page.php");
$redObj->setKeepURLParams(true);
return $redObj->Execute();
}
//end Trigger_Redirect trigger

later on......
$upd_pv_order_marknad->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1");
$upd_pv_order_marknad->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$upd_pv_order_marknad->registerTrigger("END", "Trigger_Default_Redirect", 99, "/pv/akt_tmp.php?akt_id={GET.akt_id}&order=1");
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_LinkTransactions", 98);
$upd_pv_order_marknad->registerTrigger("ERROR", "Trigger_LinkTransactions", 98);
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_Default_ManyToMany", 50);
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_Default_ManyToMany3", 50);
$upd_pv_order_marknad->registerConditionalTrigger("{POST.KT_Update2} == \"\"", "END", "Trigger_Redirect", 90);

<form........
<input type="submit" name="KT_Update1" id="KT_Update1" value="Save and go to this page" /> <input type="submit" name="KT_Update1" id="KT_Update2" value="save and go to another page" />

Thanks for any suggestions :)
Last edited by HelgeLind on 2012-10-02 21:52, edited 1 time in total.
HelgeLind
Posts: 2
Joined: 2012-10-02 20:52

Re: Redirect trigger

Postby HelgeLind » 2012-10-02 21:10

forgot to say that its working, but both buttons is redirected / trigged
User avatar
Fred
Site Admin
Posts: 484
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Redirect trigger

Postby Fred » 2012-10-05 13:47

Just had a look at the "normal" buttons on a nextensio form.

The name="KT_Insert" is used as the variable and not the id="KT_Insert".
In fact there is no ID assigned to the buttons.

So try and change the button to the following

Code: Select all

<input type="submit" name="KT_Update1" id="KT_Update1" value="Save and go to this page" /> <input type="submit" name="KT_Update2" id="KT_Update2" value="save and go to another page" />
Fred
eXel content Management Systems (XMS Systems)

Please click the "Accept the Answer" icon if you are happy with the response.

Return to “MX Kollection - Standard Edition”

Who is online

Users browsing this forum: No registered users and 1 guest