ExpressionEngine 2024 Quarter 1 Review Quarter 1 Review
Hi everyone!
I have an issue with the member registration form and I can’t seem to figure it out… Whenever I submit the form, it clears the password fields and doesn’t do anything else. It doesn’t redirect, and it doesn’t create a new user. However, the errors are working perfectly. All the settings in CP seem to be correct. What am I doing wrong?
Best Regards, Viktor.
Hi Gil,
Thanks for pointing this out…. I just added the screen name field, and still same issue.
Could it be something to do with my local environment? Also, I would like to minimize the registration form as much as possible, do you know if it is possible to use the email as the username and combine those as one field?
Best Regards, Viktor
I think you can use JavaScript to achieve that.
Try with the example form and see if it works: https://docs.expressionengine.com/latest/member/registration.html#example
Interesting… maybe take a look at the Password requirements: https://docs.expressionengine.com/latest/control-panel/settings/security-privacy.html#password-security-policy but this should’ve been printed by the password error.
Is this a fresh installation? For the sake of testing, please also set the primary_role= and make sure the role you selected is not locked.
Just so I’m clear- you submit and the page just basically reloads, no errors? To me, it sounds like it might either be losing the post data entirely or submitting to the wrong place.
A couple of things to check- these troubleshooting docs: https://docs.expressionengine.com/latest/troubleshooting/general.html#submitting-a-form-has-no-effect-and-the-page-simply-reloads
And just view source on the form itself- where’s it sending that post data? Do you have an ACT hidden field with a number in it? Might want to post it here and we can take a look.
Hi Robin,
Sorry, didn’t see the notification that you replied. Yes, it just clears the password and confirm password fields and doesn’t do anything. No errors. It does handle inline errors like its supposed to. Ex. passwords don’t match etc.
I just kinda put it in the backburner until I finish the rest of the site and put it up on a live server.
Here is the code:
<body>
<section id="auth-container">
<div class="logo-title">
/assets/images/logo/uln-logo-red.svg
<h4>Account Registration</h4>
</div>
{exp:member:registration_form
return="account/settings"
error_handling="inline"
form_class="auth-form"
include_assets="yes"
include_css="no"
primary_role="5"
}
<!-- {if error:m_field_id_1}{error:m_field_id_1}{/if}
<input class="auth-input" placeholder="First Name*" type="text" id="first_name" name="m_field_id_1" value="{if m_field_id_1}{m_field_id_1}{/if}" />
{if error:m_field_id_2}{error:m_field_id_2}{/if}
<input class="auth-input" placeholder="Last Name*" type="text" id="last_name" name="m_field_id_2" value="{if m_field_id_2}{m_field_id_2}{/if}" />-->
{if error:email}{error:email}{/if}
<input class="auth-input" placeholder="Your Email*" type="text" name="email" id="email" value="{if email}{email}{/if}"/>
{if error:username}{error:username}{/if}
<input class="auth-input" placeholder="Create Username*" type="text" name="username" id="username" maxlength="120" value="{if username}{username}{/if}"/>
<input class="auth-input" placeholder="Full Name*" type="text" name="screen_name" id="screen_name" value="{if screen_name}{screen_name}{/if}" maxlength="120" />
{if error:password}{error:password}{/if}
<input class="auth-input" placeholder="Create Password*" type="password" name="password" id="password" value="{if password}{password}{/if}"/>
<input class="auth-input" placeholder="Confirm Password*" type="password" name="password_confirm" id="password_confirm" value="{if password_confirm}{password_confirm}{/if}"/>
{if error:accept_terms}{error:accept_terms}{/if}
<div class="check-inline">
<input type="checkbox" name="accept_terms" value="y" {if accept_terms == 'y'}checked="checked"{/if} />
I agree to ULN terms of service.
</div>
<button class="submit-btn" type="submit">Register</button>
{/exp:member:registration_form}
</section>
</body>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.