Did you guys know how to prevent the open of a Form when I click on a add button?
Maybe using beforeShowForm?
function(formid)
{
if(jQuery(\'#gri
Cool, tks Oleg!!! BTW, I came with another(but not beautifull) solution:
** This is a aftershowform action. If we do not have a selected row on the main grid(#gridap), we hide the form modal with jqmHide(). Then, I use your solution to show the alertcap.
$closeform = <<< CLOSEF
function(formid)
{
if(!jQuery('#gridap').getGridParam('selrow'))
{
$('#editmodgridbal').jqmHide();
viewModal('#alertmod', { gbox: '#gbox_', jqm: true });
}
}
CLOSEF;
$grid->setNavEvent('add','afterShowForm',$closeform);