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

Moderator: ArturoRobles

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.
#817702
Sorry for not having the reply you might be looking for, but the following should disable all controls in the dynaform
Code: Select all
$('[class^="pmdynaform-control"]').prop('disabled',true);
$('[class^="pmdynaform-grid"]').prop('readonly',true);
$("button").prop('disabled',true);
To change the dynaform mode from edit to view (readonly) or disabled, you would need to change the backbone object like this:
Code: Select all
getFormById("3139343265babcd5465a282094686398").model.set('mode','disabled');
Usually, this should automatically fire a trigger that fould make all the fields inherit from the the dynaform backbone object, however, for some reason, I never made it to work.
#824706
HeshanKaru1994 wrote: Sun Jun 02, 2019 9:23 am Can you make some fields in a subform to be editable and rest to be in the view mode
Let's say the ID of your subform is "3139343265babcd5465a282094686398", then you can add this JavaScript to your parent Dynaform to only enable the "firstName", "lastName" and "address" fields in the subform:
Code: Select all
//disable all fields in subform:
$("#3139343265babcd5465a282094686398").find(".form-control").prop("disabled", true);

//enable some fields in subform:
$("#3139343265babcd5465a282094686398").find("#firstName").find(".form-control").prop("disabled", false);
$("#3139343265babcd5465a282094686398").find("#lastName").find(".form-control").prop("disabled", false);
$("#3139343265babcd5465a282094686398").find("#address").find(".form-control").prop("disabled", false);
#825350
Hi,
My form is in view mode , Can I change the display mode of the form in to edit mode when button is clicked ?

Trying this code:
$("#Edit").find("button").click(function() {
$("#Field1").getControl().attr("disabled", false);
});
or
$("#5072616315d0a42020226f9048209781").getControl().prop("disabled", false);

Thanks for your help.
Manual email send out did not run.

Dear All, Sometimes email stuck in pending when p[…]

DELETE A OUTPUT DOCUMENT

I solve the problem using this trigger $caseId =[…]

First off I am new to processmaker. I am trying to[…]

Total of grid in integer

Hi, Is there any better way to do it instead of c[…]