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.
#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 369 times
(56.23 MiB) Downloaded 687 times
#829720
You can use the Change Protected Value of Dynaform by JavaScript or Trigger function to protect a field's value from change in the web Dynaform.

You will need to create a trigger and add it to the form template where you want to protect your fields. For example, if you have a form template with a field named as "Amount", then you can add the trigger to that particular field.

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]