Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#790615
Most of the CSS for DynaForms is found in processmaker/workflow/public_html/lib/pmdynaform/build/css/PMDynaform.css, but you also might need to use the CSS files in the processmaker/workflow/engine/skinEngine/neoclassic directory. See the documentation on skins: http://wiki.processmaker.com/3.0/Skins#Creating_Skins

These CSS files don't change, so you can manually copy them from your installation of ProcessMaker. There is no way to retrieve them using the REST API.

If you need to get the JavaScript of a DynaForm via the REST API, then you can create a trigger like this in your process:
Code: Select all
@@formJS = null;
if (!isset(@@formId) or empty(@@formId)) {
   throw new Exception("Undefined Dynaform ID in variable @@formId");
}

$query = "select * from DYNAFORM where DYN_UID='"[email protected]@formId."'";
$result = executeQuery($query);

if (!is_array($result) or count($result) == 0) {
   throw new Exception("Bad SQL or invalid DynaForm ID '$dynaformId' ");
}
     
$json = $result[1]['DYN_CONTENT'];
$oForm = G::json_decode($json);
@@formJS = $oForm->items[0]->script->code;
In your code, use PUT /cases/{app_uid}/variable to set the value of @@formId. Then use PUT /cases/{app_uid}/execute-trigger/{tri_uid} to execute the trigger. Finally, use GET /cases/{app_uid}/variables to get the value of @@formJS which contains the JavaScript code for the DynaForm.

By the way, you can use the PMFDynaFormFields() function to get the structure of a DynaForm and execute it in a trigger via the REST API in the same way.

Hello amosbato, Trying to retake this conversatio[…]

Resta de valores con 2 textobox

Hola! Se replicó lo que estabas haciendo […]

Hello! If you did not find the mcrypt extension […]

Hello! You have a mistake in the url, the correct […]