Hello,
i have two download files, and each of them must be freed with a private password for download.
is this task with chronoforms /Security Question or a other Tools possible?
Best regards
Maggie
i have two download files, and each of them must be freed with a private password for download.
is this task with chronoforms /Security Question or a other Tools possible?
Best regards
Maggie
Hi Maggie,
I'd probably do this with a very simple form. Add a password entry box and submit button and then use a Custom ServerSide Validation action to check the password; show the file download links in a 'Thank You page' action.
Bob
I'd probably do this with a very simple form. Add a password entry box and submit button and then use a Custom ServerSide Validation action to check the password; show the file download links in a 'Thank You page' action.
Bob
What i did:
Password Box
Submit button
Events:
On Submit
Custom Server Side Validation
On Succes
Show Thanks Message (with the Download-File)
On Fail
Event Loop
Target event
> On Submit > Custom ServerSide Validation (0) > OnFail
Quit next actions
No
...No Form is shown on my page 😟
Maggie
Password Box
Submit button
Events:
On Submit
Custom Server Side Validation
<?php
$ok_values = array(
'passwort'
);
if ( !in_array($form->data['data'], $ok_values ) {
$form->validation_errors['data'] = "Error";
return false;
}
?>
On Succes
Show Thanks Message (with the Download-File)
On Fail
Event Loop
Target event
> On Submit > Custom ServerSide Validation (0) > OnFail
Quit next actions
No
...No Form is shown on my page 😟
Maggie
okay,
onload i forgot = show html
and no i can see the password-field an the submit button :-)
but then goes error :-(
Thanks for help
Maggie
onload i forgot = show html
and no i can see the password-field an the submit button :-)
but then goes error :-(
Thanks for help
Maggie
Hi Margaret,
Please set the Event Loop to loop to the > On Load event (that is the default setting) as you want to re-load the form when there is an error.
Is 'data' the name of your password input?
Bob
Please set the Event Loop to loop to the > On Load event (that is the default setting) as you want to re-load the form when there is an error.
Is 'data' the name of your password input?
Bob
Hi Bob,
thanks, i changed by 'loop event' >onload.
Yes, i want to test with 'data'.
Maggie
thanks, i changed by 'loop event' >onload.
Yes, i want to test with 'data'.
Maggie
Hi Maggie,
And is it working now?
If not, please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab.
Bob
And is it working now?
If not, please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab.
Bob
...the result:
Data Array:
Array
(
[chronoform] => haccp_update
[event] => submit
[Itemid] => 203
[option] => com_chronoforms
[view] => form
[Benutzerpasswort] => data
[input_submit_1] => Submit
[720a49f5c8e899f31540f1670772957e] => 1
)
Validation Errors:
Array
(
)
Data Array:
Array
(
[chronoform] => haccp_update
[event] => submit
[Itemid] => 203
[option] => com_chronoforms
[view] => form
[Benutzerpasswort] => data
[input_submit_1] => Submit
[720a49f5c8e899f31540f1670772957e] => 1
)
Validation Errors:
Array
(
)
Hi Maggie,
It looks as though the password input is called 'Benutzerpasswort' and not 'data'??
Bob
It looks as though the password input is called 'Benutzerpasswort' and not 'data'??
Bob
Hi Bob,
'Benutzerpasswort' is called the Label from the password input field.
Maggie
'Benutzerpasswort' is called the Label from the password input field.
Maggie
Hi Maggie,
It may be the Label but the debugger output tells me that it is the name too. There is no visible output with the name 'data'.
Bob
It may be the Label but the debugger output tells me that it is the name too. There is no visible output with the name 'data'.
Bob
:oops: I don't no, in which script I must register (in the backend of chronoForms) the password.
Maggie
Maggie
Hi Maggie,
I still don't understand your question - earlier in the thread I think that we talked about using a custom Serverside Validation action to check the password.
Bob
I still don't understand your question - earlier in the thread I think that we talked about using a custom Serverside Validation action to check the password.
Bob
Hi Bob,
yes, I want to give a password i shall name it now "password".
This 'password' must be, deposited in the script so that the user can type in the box ' type the credentials ', this password and than follows the download file sharing.
I hope, you can follow me.
Maggie
yes, I want to give a password i shall name it now "password".
This 'password' must be, deposited in the script so that the user can type in the box ' type the credentials ', this password and than follows the download file sharing.
I hope, you can follow me.
Maggie
Hi Maggie,
Yes that's what we've talked about all through this thread. Which part isn't working???
Bob
Yes that's what we've talked about all through this thread. Which part isn't working???
Bob
Hi Bob,
all is wrong 😟
/administrator/components/com_chronoforms/form_actions/custom_serverside_validation/custom_serverside_validation.php(16) : eval()'d code on line 5
serverside_validation is:
all is wrong 😟
/administrator/components/com_chronoforms/form_actions/custom_serverside_validation/custom_serverside_validation.php(16) : eval()'d code on line 5
serverside_validation is:
<?php
$ok_values = array(
'passwort'
);
if ( !in_array($form->data['data'], $ok_values ) {
$form->validation_errors['data'] = "Falscheingabe";
return false;
}
?>
Hi Maggie,
This line is missing a ) It should be:
Bob
This line is missing a ) It should be:
if ( !in_array($form->data['data'], $ok_values) ) {
Bob
Thanks Bob,
but by input the password 'passwort' the error display 'Falscheingabe' is shown.
Maggie
but by input the password 'passwort' the error display 'Falscheingabe' is shown.
Maggie
HI Maggie,
As I said a while ago:
Have you tried this??
Bob
As I said a while ago:
It looks as though the password input is called 'Benutzerpasswort' and not 'data'??
Have you tried this??
if ( !in_array($form->data['Benutzerpasswort'], $ok_values) ) {
Bob
Hi Bob,
😶 I hope you will help me again, please.
This are my settings:
Thanks a lot for your patience and help
Maggie
😶 I hope you will help me again, please.
This are my settings:
Preview:
Password Box
Field Name = Hirsebrei
Field ID= hirsebrei
Field Max Length= 150
Field Size= 30
Label Text= Benutzerpasswort eintragen
Submit Butten
Name= input_submit_1
Text= Submit
Button Type= Submit
Events:
On Load
Show html
Republish form data= Yes (recommended)
Display Fields Errors= Yes (recommended)
Load Security Token= Yes (recommended)
Load Keep Alive= No
Curly brackets replacer= No
Submission Event= submit
Page Number= 1
On Submit
Custom Server Side Validation
<?php
$ok_values = array(
'eingabe'
);
if ( !in_array($form->data['hirsebrei'], $ok_values )) {
$form->validation_errors['hirsebrei'] = "Falscheingabe";
return false;
}
OnSuccess
Show Thanks Message
OnFail
Event Loop
Target Event= >On Load
Quit next actions= No
Thanks a lot for your patience and help
Maggie
Hi Maggie,
The name is now Hirsebrei but in the Custom code you have used hirsebrei. They must be identical.
Bob
The name is now Hirsebrei but in the Custom code you have used hirsebrei. They must be identical.
Bob
Hi Bob,
'hirsebrei' is now everywhere in littel letters, but the result is: [attachment=0]passwortabfrage.png[/attachment]
Maggie
'hirsebrei' is now everywhere in littel letters, but the result is: [attachment=0]passwortabfrage.png[/attachment]
Maggie
Hi Maggie,
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
This topic is locked and no more replies can be posted.