Page 1 of 1

Load the dynaform json via REST API

Posted: Sat Apr 27, 2019 3:15 am
by jemiris
My problem:

I got the Dynaform REST API via GET method. Since the Dynaform as JSON content on how to view the dynaform as HTML :?:

1. There is a one way where it can be json_decode($dynaform); If I decoded I need to construct the form. But for input fields like textbox and textarea it fine. But for the file upload and grid those cases how can we construct the data. If we construct will it act as the same as processmaker form

Re: Load the dynaform json via REST API

Posted: Tue Apr 30, 2019 12:33 am
by amosbatto
You can install the extraRest plugin and then use the following endpoint to get the Dynaform field properties:
GET extrarest/dynaform/{dyn_uid}
And you can use this endpoint to upload files to ProcessMaker cases:
POST extrarest/case/{app_uid}/upload

For grids, you can create an HTML table and place the fields inside the cells. You will have to implement it yourself.

Another possible solution if you are using PM 3.2.1 or earlier (which is recommended if using the Community Edition due to bugs in the later versions) is to create web entries for each of the Dynaforms and then modify the source code in the XXXXXXXXXXXXXXXXXXXPost.php file to submit the changes to an existing case and display the Web Entry in an <iframe> in your web page.

Another way to avoid manually creating the form is to display the Dynaform inside an <iframe> and attach the session ID to the URL to open the Dynaform. See:
https://www.pmusers.com/index.php/Extra ... session-id

Re: Load the dynaform json via REST API

Posted: Thu May 02, 2019 2:41 am
by jemiris
Thanks a Lot

Re: Load the dynaform json via REST API

Posted: Thu May 02, 2019 7:56 pm
by amosbatto
This documentation will help you if you are modifying Web Entry:
https://www.pmusers.com/index.php/Web_Entry

Re: Load the dynaform json via REST API

Posted: Fri May 24, 2019 6:27 am
by jemiris
Thanks