Hi
I would like to create a download-form with a Password-Protection.
But without the Joomla!-User-Registration.
1. I send a downloadform-link to somebody with a password.
2. After filling out the form and set the right password in the password-field the user should be redirected to a new page with the download link.
I tried this with the passwordbox but it seems there is no way to predefine the password somewhere.
Any idea?
thank you in advance
chris
Hi chris,
You can do this with a form that has a password box and a submit button.
Add a Custom Serverside Validation action and use that to check the password - how you do that depends on how your password system works, it could either be from a pre-defined list, or from a list stored in a database table.
Once the password is confirmed you can show the download link using a Thank You page action.
Bob
Hi Bob
Thanks for your fast Help!
Unfortunately i am not a php-hero. So there is an empty field in the "custom server side validation"-action. ;-) There is no "Password-System" behind the Scene. I only create a password in my head, let's say: "go4hiking" and then i send this to the user.
Chris
Hi Chris,
Unfortunately ChronoForms can't read your mind so you have to find some way to let it know what password you've invented. Do you use the same one for all requests or a different one each time?
Bob
Hi Bob
Thank you again.
It will be just one password...
Chris
Hi Bob,
Thanks a lot for the Code. It doesn't work but maybe i do something wrong?
($form->data['pass']) Is "pass" the fieldname of the Password Box?
Do i have to set something more in the Password-Box than "Label Text", "Field Name" and "required" under validation?
Under "events" i have onlad: "show html" on submit: "Custom Server Side Validation" (with your Code)
and "redirect user". Maybe i forgot something?
Thank you
Chris
Hi Chris,
Yes 'pass' is the name of the form input.
The only thing I see missing is that you need to drag an Event Loop action into the pink On Fail event of the Custom Serverside action to handle the error.
Bob