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
tojag
Registered User
Posts: 57
Joined: Thu Aug 07, 2014 8:00 am

Double e-mail box in registration form

Post by tojag » Fri Dec 23, 2016 10:49 pm

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

tojag
Registered User
Posts: 57
Joined: Thu Aug 07, 2014 8:00 am

Re: Double e-mail box in registration form

Post by tojag » Fri Aug 18, 2017 12:11 pm

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
Registered User
Posts: 1371
Joined: Tue Aug 14, 2012 11:52 pm

Re: Double e-mail box in registration form

Post by ViolaF » Fri Aug 18, 2017 1:49 pm

+1

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20361
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double e-mail box in registration form

Post by RMcGirr83 » 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.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
david63
Jr. Extension Validator
Posts: 12948
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Double e-mail box in registration form

Post by david63 » Fri Aug 18, 2017 2:38 pm

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email or as they will be ignored

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20361
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double e-mail box in registration form

Post by RMcGirr83 » Fri Aug 18, 2017 6:24 pm

Displays after the password confirmation box, not directly underneath the email address input area.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
ViolaF
Registered User
Posts: 1371
Joined: Tue Aug 14, 2012 11:52 pm

Re: Double e-mail box in registration form

Post by ViolaF » Fri Aug 18, 2017 10:04 pm

then hardcoded?

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20361
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Double e-mail box in registration form

Post by RMcGirr83 » Sat Aug 19, 2017 9:23 am

Then it isn't an extension, is it.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
ViolaF
Registered User
Posts: 1371
Joined: Tue Aug 14, 2012 11:52 pm

Re: Double e-mail box in registration form

Post by ViolaF » Sat Aug 19, 2017 11:01 am

Yes, then it's a [Snippet] :geek:

User avatar
Steve
Registered User
Posts: 992
Joined: Tue Apr 07, 2009 7:48 pm
Location: UK ,up north!!
Name: Steven Clark
Contact:

Re: Double e-mail box in registration form

Post by Steve » Sat Aug 19, 2017 11:17 am

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);
});

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2144
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Double e-mail box in registration form

Post by kasimi » Sat Aug 19, 2017 3:58 pm

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.

tojag
Registered User
Posts: 57
Joined: Thu Aug 07, 2014 8:00 am

Re: Double e-mail box in registration form

Post by tojag » Mon Aug 21, 2017 7:51 pm

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: 17998
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Double e-mail box in registration form

Post by Mick » Mon Aug 21, 2017 8:06 pm

You could ask them.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

tojag
Registered User
Posts: 57
Joined: Thu Aug 07, 2014 8:00 am

Re: Double e-mail box in registration form

Post by tojag » Mon Aug 21, 2017 8:10 pm

:) I did it today and i am waiting for the answer.

User avatar
AmigoJack
Registered User
Posts: 4940
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Double e-mail box in registration form

Post by AmigoJack » Tue Aug 22, 2017 7:04 am

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 worst thing about censorship is ███████████

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 4 guests

cron