Hi all,
Trying to set a registration form up on the front end of my site, but it doesn’t seem to be working.
The form is redirecting the user but the member is not being added in the backend.
PHP is enabled for the templates index page. PHP Parsing Stage is set to Input
(Following instructions here: http://expressionengine.com/wiki/EE2_Standalone_Registration_Form)
Below is the code I am using. Any help would be gratefully appreciated.
Many thanks
Simon
<?php
$this->EE =& get_instance();
$action_id = $this->EE->functions->fetch_action_id('Member', 'register_member');
?>
{embed=includes/meta}
<div id="wrap"{if segment_1 == ""} class="home"{/if}>
{embed=navigation/primary}
<div id="yourorder">
<h1>Register</h1>
<form id="register_member_form" method="post" action="MY URL HERE">
<div class='hiddenFields'>
<input type="hidden" name="XID" value={XID_HASH} />
<input type="hidden" name="ACT" value="<?php echo $action_id; ?>" />
<input type="hidden" name="RET" value="MY URL HERE" />
<input type="hidden" name="FROM" value="" />
<input type="hidden" name="site_id" value="1" />
</div> <!-- closes out hiddenFields -->
<table class="tableBorder" border='0' cellspacing='0' cellpadding='0'>
<tr>
<td class='profileHeadingBG' colspan='2'>
<div class="tableHeading">
Member Registration
</div>
</td>
</tr><!-- end table heading row -->
<tr>
<td class='tableCellTwo'>
<div class='defaultBold'>
<span class="highlight">*</span>
Username
</div>
<div class='itempad'>Usernames must be at least 4 characters long
</div>
</td>
<td class='tableCellOne'>
<input type="text" name="username" value="" maxlength="32" class="input" size="25" />
</td>
</tr><!-- end username row -->
<tr>
<td class='tableCellTwo'>
<div class='defaultBold'>
<span class="highlight">*</span>
Password
</div>
<div class='itempad'>
Passwords must be at least 5 characters long
</div>
</td>
<td class='tableCellOne'>
<input type="password" name="password" value="" maxlength="32" class="input" size="25" />
</td>
</tr><!-- end password row -->
<tr>
<td class='tableCellTwo'>
<div class='defaultBold'>
<span class="highlight">*</span>
Password Confirm
</div>
</td>
<td class='tableCellOne'>
<input type="password" name="password_confirm" value="" maxlength="32" class="input" size="25" />
</td>
</tr><!-- end confirm password row -->
<tr>
<td class='tableCellTwo'>
<div class='defaultBold'>
<span class="highlight">*</span>
Screen Name
</div>
<div class='itempad'>
If you leave this field blank, your screen name will be the same as your username
</div>
</td>
<td class='tableCellOne'>
<input type="text" name="screen_name" value="" maxlength="100" class="input" size="25" />
</td>
</tr><!-- end screen name row -->
<tr>
<td class='tableCellTwo'>
<div class='defaultBold'>
<span class="highlight">*</span>
Email Address
</div>
</td>
<td class='tableCellOne'>
<input type="text" name="email" value="" maxlength="120" class="input" size="40" />
</td>
</tr><!-- end e-mail row -->
<tr>
<td class='tableCellTwo'>
<div class='defaultBold'>
<span class="highlight">*</span>
Confirm Email Address
</div>
</td>
<td class='tableCellOne'>
<input type="text" name="email_confirm" value="" maxlength="120" class="input" size="40" />
</td>
</tr><!-- end confirm e-mail row -->
<tr>
<td colspan='2' class='tableCellOne'>
{if captcha}
<span class="highlight">*</span> {lang:captcha}
{captcha}
<input type="text" name="captcha" value="" size="20" maxlength="20" />
{/if}
<input type='checkbox' name='accept_terms' value='y' />
<span class="highlight">*</span>
<span class="alert">I agree to the terms of service</span>
<input type="submit" value="Submit" class="submit" />
<span class="highlight">*</span>
Indicates required fields
</td>
<!--remaining code here, close divs form etc,run out of space-->Moved to Community Help forum by Moderator