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.
#813937
Hello,

I have a process with three dynaforms. Dynaform one is a link to a web entry form for our internal employees to complete which has a field to add a vendor's email address which will send the vendor a link to complete Dynaform two using Actions by email.

After the vendor completes dynaform two, the form routes to the approver. We then add another section for the approver to complete makes it Dynaform three (the original dynaform two with the extra fields).

My question is.. how do I send variables from Dynamform one to Dynaform three. There are two drop-down fields in Dynaform one that I would like to have pre-selected on Dynaform three.

So far I am able to save the two variables from Dynaform one but how do I get them to Dynaform three. Do I add them as hidden fields on Dynaform two (even though they are an Action's by email form)?

Any help you can provide will be greatly appreciated.
#813976
The values of variables are saved throughout the entire process, you just need to use the same variables in both dynaforms 1 and 3, the easiest way to do that is to export dynaform 1 and then import the resulting .json file in dynaform 3, then you can simply modify dynaform 3 to add any extra fields you may need in that form.
#814004
If the variables in form 1 and form 2 are the same in form 3, then the values will automatically be transfered to form 3.
For example, you have the variable selectClient in Form 1and the variable selectCountry in Form 2.
If you add 2 hidden fields to your Form 3 that are associated with the selectClient and selectCountry variables, then you can access them with JavaScript in Form 3.
For example, you can use JavaScript like this in Form 3:
Code: Select all
var client = $("#selectClient").getValue();
if (client != "") {
  $("#clientToDoJob").setValue(client);
}
var country = $("#selectCountry").getValue();
if (country != "") {
  $("#countryWhereJob").setValue(country);
}
Where the IDs of your two dropdown boxes are "clientToDoJob" and "countryWhereJob". I order for this to work, one of the keys in the list of options in the clientToDoJob dropdown box must match the value of the selectClient variable from Form1 Likewise, one of the keys in the countryWhereJob dropdown's list must match the value of the selectCountry variable.

If you can't figure it out, then post your process and I will look at it.
#814008
Thank you both for the prompt response! Form 1 is a separate form (with the two variables I need). Forms 2 and 3 are the same (except for the additional fields added to form 3 that are also in Form 1). As a result, I was unable to export form 1 because it is a separate form. Form 3 includes form 2.

Here is a quick example

Form 1:
Enter Guest's Email Address: john@gmail.com
Guess this user's favorite color : Red (chosen from dropdown list)

Form 2 [action by email sent to external user that does not have processmaker login]
Name: John Doe
What is your favorite color: Blue

Form 3:
Name: John Doe
What is your favorite color: Blue
The original favorite color you guessed was Red (taken from form 1) <-- This is what I need.

I'm attaching my process if that helps out.

Thank you very much in advance!
Attachments
(275.67 KiB) Downloaded 322 times
#814024
Exporting form1 is something optional that just makes the job easier, there is no problem if you are unable to export it, to get the result you want all you need to do is make sure the extra fields in form3 have the same variable name as the ones you want to get from form1.
#814028
If you just want to redisplay the same field from Form2 in Form3, then create the same field in Form3 and associate it with the same variable.

For example, in Form2, you have a field whose variable is "color", then create a field in Form3 which is also associated with the variable "color".

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]