Hi there!
I'm currently building a website for a small community with about 50 members. Those members shall be able to register themselves for the restricted area, therefore I use FEU and SelfRegistration.
Of course I only want members of the community to be able to register. So I thought, the best idea would be to have a field, where a specific value has to be entered, to proceed the registration. For example a field called "Enter Code", and the value has to be "135join-in".
How can I do this?
Regards, opa
[SOLVED] SelfRegistration: Field must have a certain value
- opawaldburger
- Forum Members
- Posts: 94
- Joined: Tue Nov 04, 2008 2:10 pm
[SOLVED] SelfRegistration: Field must have a certain value
Last edited by opawaldburger on Fri Aug 05, 2011 4:03 pm, edited 1 time in total.
Re: SelfRegistration: Field must have a certain value
opa,
Maybe you can use some (or all of the following):
http://forum.cmsmadesimple.org/viewtopi ... 28&t=55014
Duketown
Maybe you can use some (or all of the following):
http://forum.cmsmadesimple.org/viewtopi ... 28&t=55014
Duketown
- opawaldburger
- Forum Members
- Posts: 94
- Joined: Tue Nov 04, 2008 2:10 pm
Re: SelfRegistration: Field must have a certain value
Hi Duketown!
Thanks a lot for your post, but I'm afraid this doesn't help me a lot. At least a have no idea how to implement this into SelfRegistration...
-opa
Thanks a lot for your post, but I'm afraid this doesn't help me a lot. At least a have no idea how to implement this into SelfRegistration...
-opa
Re: SelfRegistration: Field must have a certain value
opa,
Once I had reread it, I can imagine it is not the easiest one to understand.
Please copy the following to your registration page:
You will first only see the field where the code should be entered. Next you will see the registration form of SelfRegistration.
Duketown
Once I had reread it, I can imagine it is not the easiest one to understand.
Please copy the following to your registration page:
Code: Select all
// Use {CodeProtectedSelfRegistration} in one of your pages
// UDT based upon idea from steelexus
// How to prepare UDT in UDT was taken from wiki documentation of CMSMS
$passprot = '135join-in'; // The code that should be entered
$pass = $_POST[pass];
if ($pass)
{
if ($pass==$passprot)
{
$_SESSION[passprot] = $passprot;
// Prepare tag to self registration
$gCms = cmsms(); //global $gCms;
$smarty = &$gCms->GetSmarty();
$smarty_data = "{cms_module module=SelfRegistration}";
$smarty->_compile_source('temporary template',
$smarty_data, $_compiled );
@ob_start();
$smarty->_eval('?>' . $_compiled);
$_contents = @ob_get_contents();
@ob_end_clean();
echo $_contents;
}
else
{
echo 'Wrong code.';
}
}
else
{
echo '
<form method=post>
Enter code: <INPUT TYPE="PASSWORD" NAME="pass" VALUE="'.$pass.'">
<INPUT TYPE="SUBMIT" VALUE="OK">
</FORM>
';
}
Duketown
- opawaldburger
- Forum Members
- Posts: 94
- Joined: Tue Nov 04, 2008 2:10 pm
Re: SelfRegistration: Field must have a certain value
This. is. great!!!
Thanks a lot, it's working fantastic!!!
Thanks a lot, it's working fantastic!!!

Re: SelfRegistration: Field must have a certain value
Good to hear/read that it works in one go.
Please put [Solved] in the header of this post.
Duketown
Please put [Solved] in the header of this post.
Duketown
Re: [SOLVED] SelfRegistration: Field must have a certain val
Hi Duketown
Thanks for providing this method of hiding the SelfRegistration form.
Does it need modification for 1.10?
The SelfReg form works as expected when not 'within' the hidden content - but although the form is shown as expected when using the udt/passcode form - completing the form does not submit its content.
Thanks
Allan
Thanks for providing this method of hiding the SelfRegistration form.
Does it need modification for 1.10?
The SelfReg form works as expected when not 'within' the hidden content - but although the form is shown as expected when using the udt/passcode form - completing the form does not submit its content.
Thanks
Allan
Re: [SOLVED] SelfRegistration: Field must have a certain val
that would be nice