Questions and discussion around ProcessMaker 2 documentation

Moderator: amosbatto

By jacr1102
#14833
Hi, I need to create a link to open a popup with a form inside, anybody know how to do it please ?
By alejandra
#15691
Hello I command code can help you create popup

var workSchedulePanel;
var workSchedulePanel=function(sWscUid){
if(!sWscUid){
sWscUid = '';
}
workSchedulePanel =new leimnud.module.panel();
workSchedulePanel.options={
size :{w:400,h:150},
position:{x:60,y:60,center:true},
control :{close:true,resize:false},fx:{modal:true},
statusBar:false,
fx :{shadow:false,modal:true}
};
workSchedulePanel.make();
workSchedulePanel.loader.show();
var r = new leimnud.module.rpc.xmlhttp({
url:"workSchedulePanel.php",
method:"POST",
args:"sWscUid="+sWscUid
});
r.callback=function(rpc){
workSchedulePanel.loader.hide();
workSchedulePanel.addContent(rpc.xmlhttp.responseText);
var scs = rpc.xmlhttp.responseText.extractScript();
scs.evalScript();
};
r.make();
};
User avatar
By liliana
#15694
Hi,

Basically you need to create 3 files:

1. The main file, on which your link will appear, on the javascritp section you need to add the following function:
function popupWindow (URL){
window.open('../.../name_file.php', 'mypopup');
}
where:

name_file.php: will be the name of the file on which you will define the name of your form
mypopup: name of your popup window.


You must indicate the path in which your php file is located

Then you need to define a field of link type:

<LINK enableHTML="1" type="link" onClick="popupWindow(this.id);return false;" link="" value="Detalles" hint="" required="0" readonly="0" savelabel="0">
<en>View pop up window</en>
</LINK>

And call the function, defined on the javascript code, on the event onclick.

onClick="popupWindow(this.id);return false

2. Create the file name_file.php with the following code:

<?php

$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', SYS_COLLECTION.'/name_filexml');
G::RenderPage('publish', 'raw');

Where:

name_filexml: will be the name of the form that will appear on the pop window

3. Finally create your XML file that will appear on your popup window

Hope this will be helpful!!

LOOPING A PARALEL TASK I have a loop, inside this[…]

Dear Amos, I want to have some fields of app_cache[…]

One of the annoying problems that are faced by use[…]

Hi, I write a code like this: $("#grid_tes[…]