Hello,
I'm trying to figure this out. Is it possible to generate unique link for a file that I'll choose (always just one file) and then put this link to e-mail?
The hardest part is to generate unique path (and maybe with some limited time validation😟 )
I found something like this: https://github.com/joshpangell/single-use
But really no success in implementing that to chrono.😟 Any idea anyone?
I'm trying to figure this out. Is it possible to generate unique link for a file that I'll choose (always just one file) and then put this link to e-mail?
The hardest part is to generate unique path (and maybe with some limited time validation😟 )
I found something like this: https://github.com/joshpangell/single-use
But really no success in implementing that to chrono.😟 Any idea anyone?
HI Mskarta,
In the On Submit event of the form create the a unique id - you can use PHP to create a random string or, if you PM me - I have a beta ChronoForms action that will do this.
Save the file name, the unique id and the date to a database table.
SUse a Custom Code action to build a link that includes the id and links to a new form event something like this http://my_domain/index.php?option=com_chronoforms5&chronoform=some_form_name&fid=xxx&event=checkid
Include the link in the email.
In the new form event add a DB Read or custom PHP to check that the id exists, and the date it was issued. If it is valid show a file download, otherwise show an error message.
Bob
In the On Submit event of the form create the a unique id - you can use PHP to create a random string or, if you PM me - I have a beta ChronoForms action that will do this.
Save the file name, the unique id and the date to a database table.
SUse a Custom Code action to build a link that includes the id and links to a new form event something like this http://my_domain/index.php?option=com_chronoforms5&chronoform=some_form_name&fid=xxx&event=checkid
Include the link in the email.
In the new form event add a DB Read or custom PHP to check that the id exists, and the date it was issued. If it is valid show a file download, otherwise show an error message.
Bob
This topic is locked and no more replies can be posted.