Creating modal from custom ViewList Action Button

i’m currently find a way to open a modal window(at the moment i would use one provided at starting point ex: ListColumsChooser or anything else) from my custom listview action button.

Creating Custom Action Button -> no problem
Adding code to launch a modal -> need help

Thanks for your help


This is an area I am not very knowledgeable in, but I did borrow some code from a friend to do a Modal on a PR I did a while ago:

That Javascript part invoking the Yahoo libraries (YUI).

See if you can make anything from it, but it is not the best example since the logic of sending stuff from backend to frontend, etc, can be a bit confusing.

Thank you.

I’ve created successfully a test modal however know i would include a smarty template like Column Chooser.

<?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/MVC/View/views/view.list.php'); class sugo_ComputersViewList extends ViewList { function __construct() { parent::__construct(); } function preDisplay() { echo ''; parent::preDisplay(); $this->lv->actionsMenuExtraItems[] = $this->getNewActionMenuItem(); } private function getNewActionMenuItem(){ global $mod_strings; return <<<EOD Create Job EOD; } } ?>

Any hint


Don’t know if you have everything you need but here I’ll have some links regarding the Action Menus:
how to add your own ListView action items…

Bulk Actions button in AOS_Invoices module:

Reverse the ListView Action buttons.:

mmh…sounds interesting.

I will read carefully and make a test.

Thank you in a while.