Double e-mail box in registration form

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Double e-mail box in registration form

Post by tojag »

People often give wrong e-mail address during registration. I have tens inactive accounts because the e-mail address is wrong (eg. typo) and people do not get activation e-mail. I suggest to double e-mail address field in registration form in future. Maybe is that possibility now?
Best regards
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Double e-mail box in registration form

Post by tojag »

Someone has a similar problem? The fact is that many email addresses are typed with an error, and new users can not activate their account because they have not received an activation link.
Double address field would be the solution to the problem.
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: Double e-mail box in registration form

Post by ViolaF »

+1
User avatar
RMcGirr83
Former Team Member
Posts: 22074
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Double e-mail box in registration form

Post by RMcGirr83 »

Unfortunately there don't seem to be any events in the template file where one can place the confirm email in a correct location.

https://github.com/phpbb/phpbb/blob/mas ... ml#L34-L37

Would be a bit out of place in another location I would think and not look good.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Double e-mail box in registration form

Post by david63 »

RMcGirr83 wrote: Fri Aug 18, 2017 2:17 pm Unfortunately there don't seem to be any events in the template file where one can place the confirm email in a correct location.
What about ucp_register_credentials_after
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
RMcGirr83
Former Team Member
Posts: 22074
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Double e-mail box in registration form

Post by RMcGirr83 »

Displays after the password confirmation box, not directly underneath the email address input area.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: Double e-mail box in registration form

Post by ViolaF »

then hardcoded?
User avatar
RMcGirr83
Former Team Member
Posts: 22074
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Double e-mail box in registration form

Post by RMcGirr83 »

Then it isn't an extension, is it.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: Double e-mail box in registration form

Post by ViolaF »

Yes, then it's a [Snippet] :geek:
User avatar
Steve
Registered User
Posts: 1556
Joined: Tue Apr 07, 2009 7:48 pm
Location: Co. Durham, England
Name: Steven Clark

Re: Double e-mail box in registration form

Post by Steve »

RMcGirr83 wrote: Fri Aug 18, 2017 2:17 pm Unfortunately there don't seem to be any events in the template file where one can place the confirm email in a correct location.

https://github.com/phpbb/phpbb/blob/mas ... ml#L34-L37

Would be a bit out of place in another location I would think and not look good.
You could use jquery after() to assign a new attribute until phpbb adds an event in that template.

example:

Code: Select all

$(function() {
	var $form = $('#register');
	var email_confirm = $('<input/>').attr({ 
		type: 'email', 
		size: 25, 
		maxlength: 100,
		id: 'email_confirm', 
		name: 'email_confirm',
		class: 'inputbox autowidth',
	});
	$form.find('input[type=email][name=email]').after(email_confirm);
});
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany

Re: Double e-mail box in registration form

Post by kasimi »

For modern browsers you can use flexbox to reorder elements.

Use the template event ucp_register_credentials_before to add the email confirmation field:

Code: Select all

<dl class="email_confirm_container">
	<dt><label for="email_confirm">{L_EMAIL_ADDRESS_CONFIRM}{L_COLON}</label></dt>
	<dd><input type="email" tabindex="2" name="email_confirm" id="email_confirm" size="25" maxlength="100" value="{EMAIL}" class="inputbox autowidth" title="{L_EMAIL_ADDRESS_CONFIRM}" autocomplete="off" /></dd>
</dl>
Add some CSS to move it below the first email field:

Code: Select all

#register .fields2 {
	display: flex;
	flex-direction: column;
}

#register .fields2 .email_confirm_container + dl {
	order: 1;
}

#register .fields2 .email_confirm_container + dl + dl {
	order: 2;
}

#register .fields2 .email_confirm_container {
	order: 3;
}

#register .fields2 * {
	order: 4;
}
The only downside is that the order is wrong if there's another extension enabled that uses the same template event to add other registration fields. In browsers that don't support flexbox like IE 9 and earlier, Steve's solution could be used as a fallback.
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Double e-mail box in registration form

Post by tojag »

Wow! Interesting discussion.
This one seems ok http://forum.atnel.pl/ucp.php?mode=register
But I don't know how to achieve this effect.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26874
Joined: Fri Aug 29, 2008 9:49 am

Re: Double e-mail box in registration form

Post by Mick »

You could ask them.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
tojag
Registered User
Posts: 422
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Double e-mail box in registration form

Post by tojag »

:) I did it today and i am waiting for the answer.
User avatar
AmigoJack
Registered User
Posts: 6127
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Double e-mail box in registration form

Post by AmigoJack »

How times change - back with 3.0 and before the registration always had a email address confirmation textbox, and some people ranted about how antiquated that concept was.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28

Return to “phpBB Custom Coding”