I am trying to implement a confirm/alertbox to check before submitting a form. This button is a Bonita submit button. I have very little knowledge of JS/jquery but can understand and implement through trial and error.
Is there an existing out of the box solution for this ? Or if you have any pointers please let me know.
I had the same problems: customizing the confirm just does not work.
However, you can customize the process template and check for a task list. This is rather tricky though because the tasks are added by script and you cannot ensure your scripts runs last! So you have to set a time out on your script.
E.g. my script for automatically running the next user task involves
function ActivateNextTask() {
if (window.console) console.log('Checking for presence of user tasks ...');
var taskElement = $('div.bonita_form_task_link');
if (taskElement.length == 0)
{
if (window.console) console.log('No user task found');
}
else
{
if (window.console) console.log('Automatically activating task ' + taskElement.text());
taskElement.click();
}
}
</script>
However this code does not work if the user is returned to this page after a gateway, because the script isn’t rerun.
Using other events (pageshow, load, …) does not work either,and the caching cannot be modified because of how the template injection works …
Thank you very much LL. That should definitely be a patch work for now. However I wish there was a one line solution like I am trying. I mean the above feature works in any html but just not in the bonita portal.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.