Bonjour
I tried this very simple script based on an idea found in the documentation of bureaucracy
"Customise the Thankyou message".
I insert a ~~GOTO>...~~
(plugin GOTO) as wiki code in the thanks message.
You just need a hidden "GoTo" field in the form with the name of the landing page.
Hum.. it probably needs some tuning as it seems too easy to be honest!
(but it works fine).
Cordialement
Philippe
<form>
action template ... ...
action template ... ...
action script PhiGoToAction.php
hidden "GoTo" "=projets:inventaire:base_cemjazz:form:tmp%s"
...
</form>
and the script in conf/plugin/bureaucracy
<?php
use dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface;
class helper_plugin_bureaucracy_handler_PhiGoToAction implements bureaucracy_handler_interface
{
public function handleData($fields, $thanks)
{
foreach($fields as $field)
{
if ($field->getParam('label') == 'GoTo')
{
$GoTo = $field->getParam('value');
break;
}
}
$thanks .= p_render('xhtml',p_get_instructions("~~GOTO>$GoTo~~"),$info);
return $thanks;
}
}