Hi,
I am simply trying to place a password lock on access to a page.
I have created a form using the form wizard and everythign works great including redirection etc.
However I need to place a validation of a single predetermines value to use as a fixed password for the password field.
Only selected registered and unregistered users will know this password
I am sure the Chrono form engine can accommodate this simple requirment but I am at a loss as to how to do this using the excellent form system you guys have provided.
For example say I have a password field and a submit button and I want the password to be "123456"
How can I ensure validation occurs with out resorting to a data base entry? [ simple validation ]
using the form system provided [terminology issue for me I think]
I guess one could say it is a bit like a HT Access type validation with out the user name
I am using the latest version
I am simply trying to place a password lock on access to a page.
I have created a form using the form wizard and everythign works great including redirection etc.
However I need to place a validation of a single predetermines value to use as a fixed password for the password field.
Only selected registered and unregistered users will know this password
I am sure the Chrono form engine can accommodate this simple requirment but I am at a loss as to how to do this using the excellent form system you guys have provided.
For example say I have a password field and a submit button and I want the password to be "123456"
How can I ensure validation occurs with out resorting to a data base entry? [ simple validation ]
using the form system provided [terminology issue for me I think]
I guess one could say it is a bit like a HT Access type validation with out the user name
I am using the latest version
Hi ozzie,
In the Server-side validation box add
Bob
In the Server-side validation box add
<?php
$password = JRequest::getString('password', '', 'post');
if ( !$password || $password != '12345' ) {
return 'Please enter a valid password';
}
?>
Bob
Works a treat Bob..... thanks!
That server validation box is an awful powerful tool
That server validation box is an awful powerful tool
I posted a topic in the Showcase Category that shows this simple application of Chrono Forms.
[for those who may be interested in the future]
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=7&t=19652&p=59118#p59118
[for those who may be interested in the future]
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=7&t=19652&p=59118#p59118
hi,
can you please help me how to set this in server side? i am using joomla 1.6, chronoform is for 1.6 as well. where will i put the code?
can you please help me how to set this in server side? i am using joomla 1.6, chronoform is for 1.6 as well. where will i put the code?
Hi amparo,
The code is slightly different for ChronoForms v4
It goes into a Custom Serverside Validation action in the Normal/Advanced Wizard. There is no equivalent action in the Easy Wizard.
Bob
The code is slightly different for ChronoForms v4
<?php
$password =& $form->data['password'];
if ( !isset($password) || !$password || $password != '12345' ) {
$form->validation_errors['password'] = 'Please enter a valid password';
return false;
}
?>
It goes into a Custom Serverside Validation action in the Normal/Advanced Wizard. There is no equivalent action in the Easy Wizard.
Bob
i already got what you said.. Thank you very much Bob..
but i have another problem,
how will i show a message on submit? i tried to put thank u message on the event on load and also tried on submit but it keeps on returning to the enter password form..
but i have another problem,
how will i show a message on submit? i tried to put thank u message on the event on load and also tried on submit but it keeps on returning to the enter password form..
Hi amparo ,
The Thank You Message action usually goes at to near the end of the On Submit action.
Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.
Bob
The Thank You Message action usually goes at to near the end of the On Submit action.
Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.
Bob
This topic is locked and no more replies can be posted.