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.
#827955
Hi,

I would like to change the Protected Value of a Control, eg a Text field, in a DynaForm subject to the value of a flag.
Grateful if I can be advise how the Protected Value can be changed by Javascript of the the Dynaform or a Trigger before the Dynaform.

Thank you very much.
cheers,
Karl
#827963
Hello!

The protected field only prevents the user from changing the value in the form, but in triggers it should be possible to change like any variable
@@ variable = new_value;
For more information about trigger, you can review this link:
https://wiki.processmaker.com/3.2/Triggers

Best regards, Ricardo.
#827967
Hi Ricardo,

I need to change the Protected Value of a Control because in some cases, users are allowed to input/value to the field in the DynaForm while in some cases, users are prohibited to do so. Hence I need to modify the Protected Value on the fly.

Where is the value of the Protected Value stored? What is the data structure?

Many Thx
cheers,
Karl
#827970
Hello!

I carried out an example process with the following characteristics:
1. I have 2 tasks A and B
2. I created 3 variables: name, lastName, email.
3. I created a dynaform
3. Each variable is associated with each dynaform control.
4. The control associated with the name variable has selected in its properties as a protected value.
5. I created a trigger where I assign a new value to the varaible name
6. I assign the trigger before the dynaform of task B
So as I told you, only by means of a trigger can you change the protected value of a variable.
I also attach the example process that I made and also a video for you to view.

Best regards, Ricardo.
Attachments
(40.01 KiB) Downloaded 77 times
(56.23 MiB) Downloaded 174 times
Processmaker Dynaform keeps Loading

Hi, Please attach here your process and tell me wh[…]

Case Notes

Can we add a user access to case notes of every wo[…]

Could be that the Processmaker Queue has not been […]

Hơn 20 năm kinh nghiệm cùng đội ngũ nh&acir[…]