Hi all,
I want to implement a very simple workflow process and I thought ChronoEngine could be the solution.
Here is basically the process I'm trying to implement:
1. A requester fills in a form. One of the fields being the email address of the approving person
2. An email is send to the approving person, asking to click on a link and later on approve or not the request
3. The link opens a window showing the request, and the approver can approve or reject it
Here is so far what I managed to do...
A. I have one form with all the info I need + a hidden input containing a "secret" random number
B. On submit, the email is going to the approving person, with the "secret" to be used as a key to approve the request
C. I have designed a second form, identical to the first one, that will show the information entered by the requester (using the "Profile Page" plugin to automatically fill in the values). The approving person is asked to enter the "secret" code to approve the request(*)
My problem is: I cannot figure out how to generate a link in my email to be sent to the approver. The link should be something like /index.php?option=com_chronocontact&chronoformname=display_form&id=<cf_id of the request being submitted right now> ...
How can I capture the cf_id before the email is sent, so that I can generate the link to be put in that email ?
Or am I going in a wrong direction ?
Thanks a lot for your help.
(*) This secret code is just to avoid the requester to self-approve his request by guessing the URL. Of course as it is now it can be viewed in the source of the form, so if I find a good solution to capture the cf_id before the email is sent I could probably find a better solution by generating the secret code at the very same moment and include it in the email instead of using a hidden field.
I want to implement a very simple workflow process and I thought ChronoEngine could be the solution.
Here is basically the process I'm trying to implement:
1. A requester fills in a form. One of the fields being the email address of the approving person
2. An email is send to the approving person, asking to click on a link and later on approve or not the request
3. The link opens a window showing the request, and the approver can approve or reject it
Here is so far what I managed to do...
A. I have one form with all the info I need + a hidden input containing a "secret" random number
B. On submit, the email is going to the approving person, with the "secret" to be used as a key to approve the request
C. I have designed a second form, identical to the first one, that will show the information entered by the requester (using the "Profile Page" plugin to automatically fill in the values). The approving person is asked to enter the "secret" code to approve the request(*)
My problem is: I cannot figure out how to generate a link in my email to be sent to the approver. The link should be something like /index.php?option=com_chronocontact&chronoformname=display_form&id=<cf_id of the request being submitted right now> ...
How can I capture the cf_id before the email is sent, so that I can generate the link to be put in that email ?
Or am I going in a wrong direction ?
Thanks a lot for your help.
(*) This secret code is just to avoid the requester to self-approve his request by guessing the URL. Of course as it is now it can be viewed in the source of the form, so if I find a good solution to capture the cf_id before the email is sent I could probably find a better solution by generating the secret code at the very same moment and include it in the email instead of using a hidden field.