Custom register page help
Permalink
Hi Guys,
I'm trying to create a custom register page and I think I'm more then half way there, but something doesn't seem to be working. I have the custom login page working perfectly, so I'm not really sure whats going on with this. I've attached a screenshot of the error message I'm getting.
And here is the code I have in my sign_in.php
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('inc/header.php');
?>
<header>
<div id="headercontent">
<div id="searcharea">
</div><!--searcharea-->
<?php
$this->inc('inc/nav.php');
?>
</div><!--headercontent-->
</header>
<div id="sign-in-register" class="ccm-form">
<h2>Register</h2>
<form method="post" action="<?php echo $this->url('/register', 'do_register')?>">
<?php if ($displayUserName) { ?>
<div>
<?php echo $form->label('uName', t('Username') )?>
<?php echo $form->text('uName')?>
</div>
<br/>
<?php } ?>
<div>
<?php echo $form->label('uEmail', t('Email Address') )?>
<?php echo $form->text('uEmail')?>
</div>
<br/>
<div>
<?php echo $form->label('uPassword', t('Password') )?>
<?php echo $form->password('uPassword')?>
</div>
<br/>
<div>
<?php echo $form->label('uPasswordConfirm', t('Confirm Password') )?>
<?php echo $form->password('uPasswordConfirm')?>
</div>
<br/>
<?php
/*
$attribs = UserAttributeKey::getRegistrationList();
$af = Loader::helper('form/attribute');
foreach($attribs as $ak) {
print $af->display($ak, $ak->isAttributeKeyRequiredOnRegister());
print '<br/><br/>';
}
*/
if (ENABLE_REGISTRATION_CAPTCHA) {
print $form->label('captcha', t('Please type the letters and numbers shown in the image.'));
print '<br/>';
$captcha = Loader::helper('validation/captcha');
$captcha->display();
?>
<div><?php $captcha->showInput();?> </div>
<?php } ?>
<br/>
<div class="ccm-buttons">
<?php echo $form->submit('register', t('Register'))?>
<?php echo $form->hidden('rcID', $rcID); ?>
</div>
</form>
</div>
<?php
$this->inc('inc/footer.php');
?>
It's not in the screenshot, but my header and title shows up. (pretty much everything before line 34 shows up, like the error message says, so I'm sure the culprit is right around there.)
I'm trying to create a custom register page and I think I'm more then half way there, but something doesn't seem to be working. I have the custom login page working perfectly, so I'm not really sure whats going on with this. I've attached a screenshot of the error message I'm getting.
And here is the code I have in my sign_in.php
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('inc/header.php');
?>
<header>
<div id="headercontent">
<div id="searcharea">
</div><!--searcharea-->
<?php
$this->inc('inc/nav.php');
?>
</div><!--headercontent-->
</header>
<div id="sign-in-register" class="ccm-form">
<h2>Register</h2>
<form method="post" action="<?php echo $this->url('/register', 'do_register')?>">
<?php if ($displayUserName) { ?>
<div>
<?php echo $form->label('uName', t('Username') )?>
<?php echo $form->text('uName')?>
</div>
<br/>
<?php } ?>
<div>
<?php echo $form->label('uEmail', t('Email Address') )?>
<?php echo $form->text('uEmail')?>
</div>
<br/>
<div>
<?php echo $form->label('uPassword', t('Password') )?>
<?php echo $form->password('uPassword')?>
</div>
<br/>
<div>
<?php echo $form->label('uPasswordConfirm', t('Confirm Password') )?>
<?php echo $form->password('uPasswordConfirm')?>
</div>
<br/>
<?php
/*
$attribs = UserAttributeKey::getRegistrationList();
$af = Loader::helper('form/attribute');
foreach($attribs as $ak) {
print $af->display($ak, $ak->isAttributeKeyRequiredOnRegister());
print '<br/><br/>';
}
*/
if (ENABLE_REGISTRATION_CAPTCHA) {
print $form->label('captcha', t('Please type the letters and numbers shown in the image.'));
print '<br/>';
$captcha = Loader::helper('validation/captcha');
$captcha->display();
?>
<div><?php $captcha->showInput();?> </div>
<?php } ?>
<br/>
<div class="ccm-buttons">
<?php echo $form->submit('register', t('Register'))?>
<?php echo $form->hidden('rcID', $rcID); ?>
</div>
</form>
</div>
<?php
$this->inc('inc/footer.php');
?>
It's not in the screenshot, but my header and title shows up. (pretty much everything before line 34 shows up, like the error message says, so I'm sure the culprit is right around there.)
add
can you also use code tags ;)
Mike