Email confirm field on join page needed....

Hi,

 

I have noticed that I have lost many new members on my site due to the fact that when they are registering on the join page they type the wrong email address by accident and they never receive a confirmation email. This makes them annoyed and they never ever come back, they also don't know that the mistake was made my them which makes my site look really unprofessional.

 

I think that the confirm email field is a must and should be added to the next update. This has happened so many times, it's scary to lose so many members for nothing.

 

If anyone has created a confirm email field which matches the original can you please share how it's done it you don't mind. I have created a field but I just don't know how to code it to make it match the original and warn them that they don't match - like the password does.

 

I don't think that this should be optional, it is important and is a must for every member website.

 

Thank you

MeMe

Quote · 7 Jun 2012

godd idea.... I would like to see this too.... I have tones of users that have made this mistake.

Quote · 7 Jun 2012

Thats a really cool idea, will work on it if nobody already know this. just have to wait..:)

so much to do....
Quote · 7 Jun 2012

Great 

 

M

Quote · 7 Jun 2012

just a thought, what is the option tab "Matching" in fields settings do?

so much to do....
Quote · 7 Jun 2012

 

just a thought, what is the option tab "Matching" in fields settings do?

 matching for our "match" maker. Compares all info and matches.

Meme, that is a great suggestion!

Hopefully someone comes up with it or Boonex will do it.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 7 Jun 2012

I tried the matching thing but I knew it wouldn't work. That's for matching people to each other.

I think it just needs a code within the new block under the advanced in the check box...if only I knew what it was.

Of course, I could totally be wrong!! 

M

Quote · 7 Jun 2012

okay, i am starting to try finding a solution.

so much to do....
Quote · 7 Jun 2012

the solution i am going to give is something i will never proud of but i tried many simple ways but nothing worked and i am out of clue why they weren't working. :(

So, here it goes

  • Open profile fields builder
  • Add a new Item and name it "ConfirmEmail"
  • Put your captions, Type = text,
  • In advanced settings, select "Mandatory" and in check field put this

        return confirmEmail($arg0);

  • Add your messages for errors in "Messages" tab.
  • Save it
  • Now open Email and go to "Advanced" tab and put this in check filed replacing previous one

        return ( getJoinEmail($arg0) and preg_match('/^([a-z0-9\+\_\-\.]+)@([a-z0-9\+\_\-\.]+)$/i', $arg0) ); 

  • Save it.
  • Open join.php, scroll down add this before PageCode();
function getJoinEmail($email) {
global $joinFormEmailInput;
$joinFormEmailInput  = $email;
return true;
}
function confirmEmail($email) {
global $joinFormEmailInput;
$q = $email;
$w = $joinFormEmailInput;
if($q != $w) {
return false;
}
return true;
}

Its done you can test now. Its not a simple or straight way but i tried several methods but they were behaving too strange like returning true even if i remove some part of the email from confirm email field. Don't know the reason..:(
On the plus side this works. Tongue Out
so much to do....
Quote · 7 Jun 2012

How does this interact with the profile info checker mod?

Does it know to match the 2 email fields?

 

http://www.mytikibar.com
Quote · 7 Jun 2012

How will i know, I don't have that mod. You have to test to see if it breaks something

How does this interact with the profile info checker mod?

Does it know to match the 2 email fields?

 

 

so much to do....
Quote · 7 Jun 2012

I'm confuesed!!! lol!!

Steve, whats the info checker mod? I dont have any extra mods for this either.

I'm sure the Boonex team will add this in somehow on the next update or in the future but I really dont want to update as i have just made my site stable.

Prashank, thanks for the effort. I will give it a try.

 

MeMe

 

 

 

Quote · 7 Jun 2012

 

How will i know, I don't have that mod. You have to test to see if it breaks something

How does this interact with the profile info checker mod?

Does it know to match the 2 email fields?

 

 

Ok, wasn't sure if you had that  mode or not.

I have a dev site I can add this to and see what happens without breaking my live site.  lol

http://www.mytikibar.com
Quote · 7 Jun 2012

 

I'm confuesed!!! lol!!

Steve, whats the info checker mod? I dont have any extra mods for this either.

 

 My fault, I MEANT this!  lol!

 

http://www.boonex.com/m/Advanced_AJAX_join_page

http://www.mytikibar.com
Quote · 7 Jun 2012

okay, let us know if it works.

so much to do....
Quote · 7 Jun 2012

Actually, I ended up adding it so it's native to the code.

It acts just like the password field.

When you go into the admin panel->builders->Profile fields  You'll see a new option for your email field called Email.

I have to do some errands but when I get back, I'll post the code.  You have to add some language strings and make 2 changes to the  database  (i'll include the query strings).

 

It modifies 3 files, probably take you about 20 minutes to do.

I maybe even include a screen shot or 2!  ;)

 

http://www.mytikibar.com
Quote · 7 Jun 2012

Ok, here it is!!

 

1st things 1st!  BACKUP your data!

If you have a test site, try it on the test site FIRST!

I have installed this on 2 of my sites and it works as advertised.

ALTER TABLE `YOURDATABASE`.`sys_profile_fields` CHANGE `Type` `Type` ENUM( 'text', 'html_area', 'area', 'pass', 'date', 'email', 'select_one', 'select_set', 'num', 'range', 'bool', 'system', 'block' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'text'
 
 
UPDATE `YOURDATABASE`.`sys_profile_fields` SET `Type` = 'email' WHERE `sys_profile_fields`.`ID` =4;

Clear your cache!

Here's the language keys.

'_Confirm email' => 'Confirm Email'
 
'_Email confirmation failed'  => 'Email confirmation failed'
 
'_Confirm email descr' => 'Enter same email address here'
 

Now the good stuff!

all files are located in /inc/classes

In BxDolJoinProccessor.php

 

Around line 198

                                case 'pass':
                                    $aHiddenFields[ $sItemName . '_confirm[' . $iHuman . ']' ] = $mValue;
                                case 'text':

ADD THIS
###
#SteveSoft
#06-07-2012
#                                   
                                case 'email':
                                    $aHiddenFields[ $sItemName . '_confirm[' . $iHuman . ']' ] = $mValue;

in the file BxDolPFM.php

around line 47 find

            'area'       => 'TextArea',
            'html_area'  => 'HtmlTextArea',
            'pass'       => 'Password',

ADD THIS
###
#SteveSoft
#06-07-2012
#           
            'email'      => 'Email',
           
around line 68 find

            'html_area'  => "text NOT NULL",
            'pass'       => "varchar(40) NOT NULL",

ADD THIS
###
#SteveSoft
#06-07-2012
#           
            'email'      => "varchar(255) NOT NULL",

around line 1040 find

                            $aUpdate['Default'] = trim( process_pass_data( $aData['Default'] ) );
                        break;
                        case 'pass':

ADD THIS
###
#SteveSoft
#06-07-2012
#                           
                        case 'email':

 

in the file BxDolProfileFields.php

 

around line 118 find

                        case 'text':
                        case 'area':

ADD THIS
###
#SteveSoft
#06-07-2012
#                           
                        case 'email':

around line 259 find

            'html_area' => array( 'Mandatory', 'Min', 'Max', 'Unique', 'Check' ),
            'pass'      => array( 'Mandatory', 'Min', 'Max', 'Check', 'PassConfirm' ),

ADD THIS
###
#SteveSoft
#06-07-2012
#           
            'email'      => array( 'Mandatory', 'Min', 'Max', 'Check', 'EmailConfirm' ),

around line 339

            case 'pass':
                if( mb_strlen( $mValue ) > 0 and mb_strlen( $mValue ) < $iMin )
                    return false;
            break;

ADD THIS
###          
#SteveSoft
#06-07-2012
#
            case 'email':
                if( mb_strlen( $mValue ) > 0 and mb_strlen( $mValue ) < $iMin )
                    return false;
            break;

around line 383

find this

            case 'area':
            case 'pass':

ADD THIS
###               
#SteveSoft
#06-07-2012
#
            case 'email':
                if( mb_strlen( $mValue ) > $iMax )
                    return false;
            break;

around line 470

find this

               if( empty($mValue) ) // standard check
                    return false;
        }

ADD THIS
###
#SteveSoft
#06-07-2012
#       
        elseif( $aItem['Type'] == 'email' ) {
            if( $this -> iAreaID == 2 or $this -> iAreaID == 3 or $this -> iAreaID == 4 ) // if area is edit, non-mandatory
                return true;
            else
                if( empty($mValue) ) // standard check
                    return false;
        }

around 796 find this

                }
            break;
           
            case 'pass':

ADD THIS
###
#SteveSoft
#06-07-2012
#               
            case 'email':

 

around 1364 find this

                   if ($bCoupleEnabled && !in_array( $aItem['Name'], $this -> aCoupleMutual ))
                        $aAddInputs[] = $this->convertJoinField2Input($aItem_confirm, $aInputParams, 1);
                }

ADD THIS
###
#SteveSoft
#06-07-2012               
#
                 if ($aItem['Type'] == 'email') {
                    $aItem_confirm             = $aItem;                 
                    $aItem_confirm['Name']    .= '_confirm';
                    $aItem_confirm['Caption']  = '_Confirm email';
                    $aItem_confirm['Desc']     = '_Confirm email descr';
                   
                    $aInputs[] = $this->convertJoinField2Input($aItem_confirm, $aInputParams, 0);
                   
                }

around line 1522 find this

                    if ($bCoupleEnabled && !in_array( $aItem['Name'], $this -> aCoupleMutual ))
                        $aAddInputs[] = $this->convertEditField2Input($aItem, $aInputParams, 1);
                }

ADD THIS
###
#SteveSoft
#06-07-2012
#               
                if ($aItem['Type'] == 'email') {
                    $aItem_confirm = $aItem;                  
                    $aItem_confirm['Name']    .= '_confirm';
                    $aItem_confirm['Caption']  = '_Confirm email';
                    $aItem_confirm['Desc']     = '_Confirm email descr';
                   
                    $aInputs[] = $this->convertEditField2Input($aItem_confirm, $aInputParams, 0);
                                   
                }

around line 1615 find this

           case 'datetime':  
                    $aInput['type']  = 'datetime';
                    $aInput['value'] = $aValues[$iPerson];
                break;

ADD THIS
###
#SteveSoft
#06-07-2012
#           
            case 'email':     
                    $aInput['type']  = 'email';
                break;

around line 1748 find

            case 'date':       $aInput['type']     = 'date';     $aInput['value'] = $aValues[$iPerson]; break;
            case 'datetime':   $aInput['type']     = 'datetime'; $aInput['value'] = $aValues[$iPerson]; break;

ADD THIS
###
#SteveSoft
#06-07-2012
#
            case 'email':  $aInput['type'] = 'email'; break;
                       

and that's it!

you MAY need to adjust your CSS for the email and confirm email fields

 

If this works for you, I do have a paypal account.  ;)

http://www.mytikibar.com
Quote · 8 Jun 2012

hi Steve,

I added it to my site but it didn't work.  Possibly because I'm using a two-page join form.  Did you test it on a multi-page join form?

Update1...  I switched to a one page form and it still does not work.  If put an email address in the "Email" input box, and try to submit the form, it appears to cause error checking to stop for the entire form.  If I leave it empty but try any other form input (that's mandatory) there will be error flags displayed.  Also if I fill in every form input with good data... I still cannot successfully submit.  Since I have made a few small changes from the default code it could be another change that's interfering with your code.

Update2... if the text input into the Email input box is NOT a proper email then I do get error flags.  As soon as the input text looks like a proper email address there are no error flags anywhere in the form upon 'submit'.  So it appears it's checked two ways... one way works and the other does not.  Checking for a match between the two email input boxes does not appear to be working.

I rolled back to the previous setup.  No harm done.  It is a good idea and definitely worth trying to integrate into my site.  Even though it did not work for me... thank you for sharing another excellent idea. I'm sure others will find it works. 

http://pkforum.dolphinhelp.com
Quote · 8 Jun 2012

I had tried the way steve is showing but it didn't worked for me, maybe i missed something. Possible as i didn't put too much time in it.

so much to do....
Quote · 8 Jun 2012

I am sorry it didn't work on your site. I am not sure what is going on there.

It works on mine, I have to have a 2 page join form or the chinese just take over.

Are you SURE you cleared your cache after making the database changes?

Did you verify in your admin panel->builder->profile fields->email  that field is indeed set to email?

Do you get 2 email fields properly labeled in your form?

Did you check your logs for any kind of error?

I have 2 different sites, a dev site and a live site.  I produced the mod on the dev site and performed the steps included in my article to my live site and it worked.

Are you SURE it's just not identifying on the 1st run thru that the 2nd email is blank.  I changed 1 of the language keys to suggest that could be the issue to the member.

 

'Email confirmation failed' => 'Emails do not match!'

It does that because the 2nd field is blank.

I verified again this morning that it does indeed work.

I hope we can get this working for you..

http://www.mytikibar.com
Quote · 8 Jun 2012

Thank you Steve... for your lengthy response. I cleared the cache several times while testing... both site and the browser I was testing with (latest version of Opera).  I didn't check the error logs... and I should have.  It was a 'dead' response when I added any type of well-formed email address. Didn't matter if the confirmation email was empty, non-matching, or matching.... nothing happened.  I didn't check the admin panel > profile fields... but I triple checked the database changes to ensure they definitely took place as requested. The two email fields looked 'perfect' and all the language keys appeared to work. 

I have a test site as well so I'll check it there in a few days (busy schedule Fri/Sat).  Is there something special that needs to be done to fully enable the type of 'email'... or will it work just by simply adding it to the site's db and code?  In other words, does the hosting server's PHP configuration need to be updated to properly use 'email' type?

I am sorry it didn't work on your site. I am not sure what is going on there.

It works on mine, I have to have a 2 page join form or the chinese just take over.

Are you SURE you cleared your cache after making the database changes?

Did you verify in your admin panel->builder->profile fields->email  that field is indeed set to email?

Do you get 2 email fields properly labeled in your form?

Did you check your logs for any kind of error?

I have 2 different sites, a dev site and a live site.  I produced the mod on the dev site and performed the steps included in my article to my live site and it worked.

Are you SURE it's just not identifying on the 1st run thru that the 2nd email is blank.  I changed 1 of the language keys to suggest that could be the issue to the member.

 

'Email confirmation failed' => 'Emails do not match!'

It does that because the 2nd field is blank.

I verified again this morning that it does indeed work.

I hope we can get this working for you..

 

http://pkforum.dolphinhelp.com
Quote · 8 Jun 2012

Nothing needed on the server end.

It performs the same checks as the password fields do.

The only thing I could think of is going into your profile fields builder and verify/save your email field. maybe there's a flag I didn't catch that dolphin sets when you change the field type.

Change that email block to password, save it, then go back and change it back to email.  If that works, I need to investigate!

http://www.mytikibar.com
Quote · 8 Jun 2012

Hey guys,

You have all been busy with this I see. I have been away for a while and now i'm back but boy...I'm even more confused than before. 

Should i try and do this Steve? You have worked so hard, all of you to test it out etc etc... Can it do any harm to the site if it doesn't work? 

Thanks

M

Quote · 19 Jun 2012

If you are doing your own coding mods, it is IMPERATIVE that you have a dev site that you try things on.

You should NEVER do coding mods on a live site.  That's asking for disaster (with murphy's law and all).

I am in a unique situation where I run my own hosting (I have my own box at my house) and have setup 2 sites.

One is live, one is the dev.

I can poke around and break things all day long on the dev site and not worry about anything.

With THAT being said, I DID develop this mod on my dev site and tested it, then moved to my live site and it does indeed work on both with the steps I laid out.

I just tested and verified on a 2 page join field that it does indeed work.  Just follow my instructions.

If you want to try it, see my site in my sig.

http://www.mytikibar.com
Quote · 19 Jun 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.