Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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.
By richvle
#795111
Is there a way to retrieve the form's ID?

In the ProcessMaker documentations, in all the examples, they use a literal string for the ID.
For example,
syntax: $("#form-id").closeForm(); //form-id: The Dynaform ID.
example: $("#32228660756e6cc9b4fc9e4080264090").closeForm();

Is there a way to generically code it so that it retrieves the form's ID? Something like through a function...
$(getformUID()).closeForm();
User avatar
By amosbatto
#795126
You can use:
$("form").saveForm()
Or if you want the DynaForm's ID:
$("form").prop("id")
See:
http://wiki.processmaker.com/3.0/JavaSc ... ning_forms

There is also a frame property which you can use but that frame property only exists when running a case:
var dynaformId = frames.dyn_uid ? frames.dyn_uid : $("form").prop("id");
See:
http://wiki.processmaker.com/3.0/JavaSc ... properties

Thanks for the link, amosbatto! I was searching fo[…]

Hello Please can you help me with the place where […]

Hi there, I have 3.5.7, 3.8.1 and 3.8.2 versi[…]

AI bot development involves creating intelligent b[…]